This is the mail archive of the gdb@sources.redhat.com mailing list for the GDB project.
| Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
|---|---|---|
| Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
| Other format: | [Raw text] | |
It seems that GDB (starting with 5.1.1 or so) can no longer debug
programs written in languages unknown to it. With previous GDB
versions, you could at least set breakpoints, get backtraces, and
examine most variables, although you had to take name mangling into
account.
For example, if I try to set a breakpoint in an Ada program, I just
get the error message "internal error - unimplemented function
unk_lang_create_fundamental_type called."
Is there a workaround? Even if full Ada support is not available,
getting backtraces would be helpful in some cases.
Here's a small, stand-alone test program (you have to compile it using
"gcc -S -g no_debug.adb && gcc no_debug.s", as it doesn't use the Ada
run-time library).
package No_Debug is
procedure Main;
pragma Export (C, Main, "main");
end No_Debug;
with System; use System;
package body No_Debug is
procedure Puts (Str : Address);
pragma Import (C, Puts, "puts");
Message : constant String := "Hello, world!" & ASCII.NUL;
procedure Main is
begin
Puts (Message'Address);
end Main;
end No_Debug;
I've attached the x86 assembler code below, in case you want to
experiment yourself without having to install Ada.
Attachment:
no_debug.s
Description: Text document
| Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
|---|---|---|
| Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |