Community
Participate
Working Groups
Build Identifier: 20100917-070 CDT GDB Common Version: 7.0.0.201009241320 Build id: 201009241320 Snow Leopard 10.6.4 The only way I can issue GDB commands is by doing this: 1. Start debugging session in Eclipse 2. Open 2 consoles in Eclipse debugger 2.1 One console for "gdb traces" 2.2 Another console for "gdb" This is an example of how all this looks. I am issuing "p i" to print variable i. http://img809.imageshack.us/img809/4579/screenshot20101028at102.png Every time I want to issue a gdb command, I have to input my command in the gdb console, and see the output in gdb traces. Also, my gdb traces output isn't really what I want. I get a lot of formatting garbage, and useless information. I was told in http://www.eclipse.org/forums/index.php?t=rview&goto=638677&SQ=98ac8122651c7795d4aa2d96d95c0776&S=66aec324878854260ee1fe79d64888fa& that in Linux you can issue GDB commands in single console like I want, so this maybe a bug. Reproducible: Always Steps to Reproduce: 1. Enable gdb traces 2. Set a breakpoint 3. Debug 4. Open a gdb terminal 5. Open a gdb-traces terminal
On Linux the output of gdb traces is: 105,945 38-interpreter-exec console "p i" 105,949 ~"$2 = 9" unlike your screenshot where it is 105,945 38-interpreter-exec console "p i" 105,949 $2 = 9 There is a missing ~ before the output, which is why the output does not end up on the gdb console. Can you include the full gdb traces output? I'm curious to see why we get the output [Switching to process 9544] in the gdb console. Probably some issue with Mac's GDB. For more info, can you try this from a command shell (not in eclipse) > gdb -i mi <yourBinary> (gdb) b main (gdb) run (gdb) p i (gdb) -interpreter-exec console "p i" I'm curious to see if it is -interpreter-exec console that is causing the missing ~.
Created attachment 183036 [details] how does [Switch process xyz] happen
Created attachment 183039 [details] missing ~ in interpreter-exec output
(In reply to comment #3) > Created an attachment (id=183039) [details] > missing ~ in interpreter-exec output So it's a bug in apple's GDB. We could try to avoid using -interpreter-exec console on the mac. It may not be complicated to do but it won't be trivial, so I'll need someone to tackle it. BTW, Marc-Andre, you never saw this issue before?
(In reply to comment #4) > BTW, Marc-Andre, you never saw this issue before? No, I never noticed. I'll take a look.
Proposed fix: https://git.eclipse.org/r/#/c/7290/