| Summary: | Can't easily issue GDB commands in Mac | ||||||||
|---|---|---|---|---|---|---|---|---|---|
| Product: | [Tools] CDT | Reporter: | roln <bioneawb> | ||||||
| Component: | cdt-debug | Assignee: | cdt-debug-inbox <cdt-debug-inbox> | ||||||
| Status: | NEW --- | QA Contact: | Jonah Graham <jonah> | ||||||
| Severity: | major | ||||||||
| Priority: | P3 | CC: | cdtdoug, malaperle, marc.khouzam, nathan.huesken, pawel.1.piech | ||||||
| Version: | 7.0 | ||||||||
| Target Milestone: | --- | ||||||||
| Hardware: | Macintosh | ||||||||
| OS: | Mac OS X - Carbon (unsup.) | ||||||||
| Whiteboard: | |||||||||
| Attachments: |
|
||||||||
|
Description
roln
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/ |