How:: GDB: "Setting breakpoint pending on" option programmatically. [message #227292] |
Wed, 26 November 2008 09:17  |
Eclipse User |
|
|
|
Hi
can anyone help me to set "set breakpoint pending on" option of gdb
programmatically?
I am using gdb6.8 and want to debug a dll.
This is how I am setting up the rest of the values.
configuration.setAttribute(ICDTLaunchConfigurationConstants. ATTR_DEBUGGER_ID, "org.eclipse.cdt.debug.mi.core.MinGW");
configuration.setAttribute(ICDTLaunchConfigurationConstants. DEBUGGER_MODE_RUN,true);
\\this is how i set the command file path(i can see it in the UI), but
seems like its not even been getting called.
configuration.setAttribute(ICDTLaunchConfigurationConstants. ATTR_DEBUGGER_SPECIFIC_ATTRS_MAP, "c:\\gdb.ini"); configuration.setAttribute(IMILaunchConfigurationConstants.A TTR_DEBUG_NAME, "C:\\gdb\\bin\\gdb.exe");
configuration.setAttribute(IMILaunchConfigurationConstants.A TTR_DEBUGGER_VERBOSE_MODE,true);
configuration.setAttribute(ICDTLaunchConfigurationConstants. ATTR_DEBUGGER_STOP_AT_MAIN_SYMBOL, "XXXXXXXXXX");
but I got the same error:
&"Function \"XXXXXXXXXX\" not defined in loaded symbols.\n"
Function "XXXXXXXXXX" not defined in loaded symbols.
When i debug the same dll from CLI using these commands:
set breakpoint pending on
set new-console on
set stop-on-solib-events 0
break XXXXXXXXXX
file exefilepath
run
In this case the breakpoint at funtion XXXXXXXXXX are been hitted.
I want the same result from CDT Debug Configuration.
Any suggestion?
Thanks
Padam
|
|
|
Re: How:: GDB: "Setting breakpoint pending on" option programmatically. [message #493514 is a reply to message #227292] |
Mon, 26 October 2009 11:20  |
Eclipse User |
|
|
|
Eclipse CDT is using the MI command protocol with GDB command line tool.
When using GDB from commmand line, another command interpreter is used.
The "pending breakpoint enabled" internal state variable is local to
command interpreter and is stored inside it (if interpreter supports it),
but not in GDB core.
THe MI command interpreter does NOT support "pending breakpoint enabled" internal variable.
So "set breakpoint pending on" in ~/.gdbinit does NOT affect on CDT to GDB interaction.
Thought user can set pending breakpoints in GDB console inside CDT
if "set breakpoint pending on" is set in ~/.gdbinit or manually.
The MI protocol needs the "pending" properti to be set individually for each breakpoint when it is assigned. This may be done by means of adding "-f"
option to the MI "-break-insert" command.
Thougth not all versions of GDB are supporting "-f" option. So a spetial
acre is to be taken due to ask the GDB if it really supports "-f" and "pending-breakpoints themselves".
We submitted initial patch addressing the issue:
https://bugs.eclipse.org/bugs/attachment.cgi?id=150516
See also: https://bugs.eclipse.org/bugs/show_bug.cgi?id=248595
The GDB itself may have issues with pending breakpoints if you are debugiing the Linux kernel, a spetial patch ( ftp://ftp.us.kernel.org/pub/linux/kernel/people/trini/patche s/gdb/6.3/gdb-6.3-kgdb-module-notification.patch) is needed because
some GDB versions can't even monitor shared object loading inside the kernel
|
|
|
Powered by
FUDForum. Page generated in 0.03242 seconds