At 20:28 05/06/2002 , vous avez écrit:
Hello.
Hopefully this will be of interest to some of you - if not, my apologies if I am off-topic.
It is at least for me (as I wrote the pascal language support for GDB).
I found that when trying to use the "insight gdb" visual debugger on a binary made using (my locally built) GPC 2.1, the debugger crashes while performing an initial read of the "stabs" info in the binary. But it doesn't crash on binaries made from the (Redhat distributed binary) gpc-19990118.
I'm not 100% sure that this is an insight gdb problem - it might take a stabs expert to decide whether insight's logic is correct here or whether there's anything invalid about the stabs sequence emitted by gpc. In any case, below is a simple patch of insight to work around the problem. It works for a couple of multi-module gpc programs that I've tried it with.
Diud you test it by using insight in non windowed mode (with --nw option), then you get the normal text mode version of gdb.
BTW, the debugger source is ftp://sources.redhat.com/pub/gdb/releases/insight-5.2.tar.bz2
I just submitted a problem report to the insight developers - we'll see what they say.
Here's the patch:
You forgot to tell us to which file we should apply this patch :(
1,12d0 < /* modified 5/31/02 Robert Scher. Changes flagged with "RBS". < Works around a problem encountered when reading executables produced < by gpc (Gnu Pascal) version 2.1. Without this change - or hopefully < a more proper correction that attacks the problem head-on, < the "insight" (graphical) variant of gdb crashes at the point where it < reads the stabs section associated with the file error.pas in the < gpc 2.1 support files set. This is a problem peculiar to the graphical < mode (and has been seen on several versions of "insight"). < insight running in non-graphical mode (with the --nowin flag ) does < not exhibit this problem. < */ <
1613c1601
< {
{
1641d1628 < 1652a1640
2767,2771c2755 < // start RBS patch: check to prevent popping garbage when depth is already 0 < if (!context_stack_depth) < break; // ignore it! < // end RBS patch
< new = pop_context ();
new = pop_context ();
Bob Scher
Pierre Muller Institut Charles Sadron 6,rue Boussingault F 67083 STRASBOURG CEDEX (France) mailto:muller@ics.u-strasbg.fr Phone : (33)-3-88-41-40-07 Fax : (33)-3-88-41-40-99