Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Opening the debugger with additional switches #13

Closed
simonjwright opened this issue May 15, 2017 · 3 comments
Closed

Opening the debugger with additional switches #13

simonjwright opened this issue May 15, 2017 · 3 comments
Labels

Comments

@simonjwright
Copy link
Contributor

GDB bug 11385 means that GDB on macOS (and possibly other systems) can’t catch exceptions with FSF GCC:

(gdb) catch exception
Your Ada runtime appears to be missing some debugging information.
Cannot insert Ada exception catchpoint in this configuration.

The easiest fix is to use additional switches on opening GDB (-readnow): gdb -readnow foo.
How can I arrange this in GPS?

(as a side note, is it correct that I have to say catch exception in the debugger console?)

@setton
Copy link
Member

setton commented May 23, 2017

There is no way at the moment to specify the switches passed to the debugger... I would suggest fixing this at the GDB level rather than adding workarounds at the GPS level.

From an user's perspective, it should be possible to catch exceptons after doing an initial "start/begin" in the debugger, right?

@setton setton added the wontfix label May 23, 2017
@setton setton closed this as completed May 23, 2017
@simonjwright
Copy link
Contributor Author

From an user's perspective, it should be possible to catch exceptons after doing an initial "start/begin" in the debugger, right?

No.

(gdb) start
Temporary breakpoint 1 at 0x100007338: file cxag001.adb, line 103.
Starting program: /Users/simon/ACATS/t/cxag001 
[New Thread 0x1403 of process 5479]
warning: unhandled dyld version (15)

Temporary breakpoint 1, _ada_cxag001 () at cxag001.adb:103
103	procedure CXAG001 is
(gdb) catch exception
Your Ada runtime appears to be missing some debugging information.
Cannot insert Ada exception catchpoint in this configuration.

So the alternative is to build a special version of GDB for macOS users that does -readnow without being asked.
Or maybe one could do some shell/path fudge (would be less work).

@setton
Copy link
Member

setton commented Jul 28, 2017

@simonjwright, one "workaround" suggestion: you could create a "gdb" script which would be a simple wrapper to the real gdb, just invoking it with -readnow and the rest of the arguments, and then place this in front of your PATH - would this work for you?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants