Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [cdt-dev] Setting Breakpoints symbolically? (in gdb/DSF)

Sorry, Outlook decided to send the email without asking me.
 
I should be possible for GDB to set the breakpoint using the file path on the local file system.
However, GDB must know where the source code is.  If you have moved your binary on the local FS
from where it was compiled to a new location, you have to tell GDB where the source code is.
 
You can try different things.
 
1- Use the binary in the location where it was compiled with respect to the source code
2- In your .gdbinit file, use the directory command:
   directory <full path to source code>
3- Type #2 by hand in the gdb console
 
Marc
 
 
 

From: cdt-dev-bounces@xxxxxxxxxxx [mailto:cdt-dev-bounces@xxxxxxxxxxx] On Behalf Of Dominik Röttsches
Sent: Monday, June 13, 2011 8:00 AM
To: cdt-dev@xxxxxxxxxxx
Subject: [cdt-dev] Setting Breakpoints symbolically? (in gdb/DSF)

Hi,

when I look at the gdb and gdb-traces consoles when debugging in conjunction with a remote gdb-server target, I see that the breakpoints are sent to gdbserver via:
[...] break-insert /path/to/the/file/on/my/local/system/myProject/mySubDir/sourcefile:79 

I.e. it tries to set breakpoints by local file path and line number. 

Is it possible to either
a) just set the breakpoint symbolically? I.e. 'break-insert Namespace::Class::MyFunction'
b) strip the local-system parts of the path, i.e. only set breakpoint by "myProject/mySubDir/sourcefile:79"

In the current way, in a remote debugging setup, gdbserver does not accept the breakpoint specification containing the full local path and the debugging session cannot be created. However, when I manually add such a symbolic breakpoint in the gdb console, it's possible to set it symbolically.

Thanks for your help,

Dominik

Back to the top