Debugging Flex with Emacs 22/23

I’m working a lot with the Flex 3.3 SDK at the moment, using Emacs and the Adobe fdb debugger run from M-x gdb. Since upgrading from Emacs 21 to 22, the debugger seemed to stop being able to trace through the source files correctly. You could set breakpoints in files from Emacs with C-x b, and the source paths were all known to fdb so the correct code would appear list in the debugger console. But the connection back to display the source file in another buffer with the current line arrow wouldn’t show.

After some digging it turns out that to produce output specially marked up with ^Z characters for Emacs to read, both gdb and fdb need to be invoked with the fullname option. But while gdb accepts -f, -fullname or --fullname for this, fdb doesn’t accept the double-dash --fullname style – and the Emacs 21 to 22 upgrade changes the argument from the single to the double dash form.

If you know that the fix is easy, you just need to invoke fdb with the -f or -fullname argument. You can find the acceptable forms in the fdb source code here.

Update: for the change to Emacs 23, you need to use M-x gud-gdb instead of M-x gdb.
So: M-x gud-gdb, enter fdb -f and everything works as it should.

Or put this in .emacs, and use M-x fdb:

(defun fdb ()
"Run fdb debugger"
(gud-gdb "$PATH_TO_FDB/fdb -f") )


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s