Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [cdt-dev] DSF-GDB: How to support targets which natively support reverse execution ?

Ok, so the enablement of the reverse commands should not be linked to 'record',
but should be linked to the target being used.
 
Do you know if GDB has a command to ask the target if reverse execution is supported?
 
I don't really like the idea of always having the reverse buttons enabled because it will
make user believe they can do reverse execution when they often cannot.
For example, on Windows.
 
You can open a bug about this and we can try to find a good solution
 
Thanks
 
Marc
 


From: cdt-dev-bounces@xxxxxxxxxxx [mailto:cdt-dev-bounces@xxxxxxxxxxx] On Behalf Of Kai Schuetz
Sent: Monday, August 30, 2010 8:55 AM
To: CDT General developers list.
Subject: Re: [cdt-dev] DSF-GDB: How to support targets which natively support reverse execution ?

In my case no initialization is required, I can immediately make use of the reverse commands.

 

Thanks,
Kai

 

From: cdt-dev-bounces@xxxxxxxxxxx [mailto:cdt-dev-bounces@xxxxxxxxxxx] On Behalf Of Marc Khouzam
Sent: Monday, August 30, 2010 14:53
To: 'CDT General developers list.'
Subject: Re: [cdt-dev] DSF-GDB: How to support targets which natively support reverse execution ?

 

So you use plain GDB in this case, but not the 'record' command?

Do you have to do any special initialization (like DSF-GDB does with 'record'),

or can you directly use the reverse commands?

 

Thanks

marc

 


From: cdt-dev-bounces@xxxxxxxxxxx [mailto:cdt-dev-bounces@xxxxxxxxxxx] On Behalf Of Kai Schuetz
Sent: Monday, August 30, 2010 6:45 AM
To: cdt-dev@xxxxxxxxxxx
Subject: [cdt-dev] DSF-GDB: How to support targets which natively support reverse execution ?

I’m trying to use reverse debugging with my target. Contrary to some other targets it has “native” support of reverse debugging -- this means it does not require to use “process record and replay” to do reverse debugging.

 

The following bit is taken from the gdb documentation:

 

“The process record and replay target supports reverse execution (see Reverse Execution), even if the platform on which the inferior runs does not. However, the reverse execution is limited in this case by the range of the instructions recorded in the execution log. In other words, reverse execution on platforms that don't support it directly can only be done in the replay mode.”

 

This implies that targets exist which do directly support reverse execution, without supporting process record and replay.

 

In my case reverse execution is directly supported, however the problem is that DSF-GDB as part of its initialization is trying to switch on record and replay by issuing the “record” gdb command (file GDBRunControl_7_0.java line 435 and following, “enableReverseMode” method). Since record and replay is not supported for my target the “record” command fails, which makes DSF-GDB believe that reverse execution is not supported for the target.

 

I’m not sure what the proper solution to support both types of targets would be ?

How about issuing the “record” command, but still enable reverse execution if the command fails ?

 

Thanks !

Kai

 


Back to the top