This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: Bad line number debug info on alpha-dec-osf
- To: law at cygnus dot com
- Subject: Re: Bad line number debug info on alpha-dec-osf
- From: Norbert Berzen <norbert at dune dot gia dot rwth-aachen dot de>
- Date: Mon, 29 Mar 1999 13:08:06 +0200
- Cc: egcs-bugs at egcs dot cygnus dot com
- References: <2327.922596281@upchuck>
Compiler: egcs-2.91.66
--------
Machine/OS: alpha-dec-osf3.2
----------
Compilation command: gcc -g -S -o myfile myfile.c
-------------------
Input file: "myfile.c"
----------
int a;
void f (void)
{
a = 7;
}
int main ()
{
f ();
return 0;
}
Output file: "myfile.s"
-----------
... some stuff deleted here
.align 5
.globl f
.ent f
f:
.frame $15,16,$26,0
.mask 0x4008000,-16
ldgp $29,0($27)
$f..ng:
$LM1:
#.stabn 68,0,6,$LM1
subq $30,16,$30
... some stuff deleted here
The Bug: The label `$LM1:' (and the `#.stabn 68,0,6,$LM1')
------- should appear _before_ the `ldgp $29,0($27)'.
Comment:
-------
The effect of this bug is that the function prologue checking
mechanism of stock gdb-4.17 (and gdb-4.17.X) gets totally
confused. So the `next' and `nexti' commands of gdb do not
work as expected. They step _into_ `f()' instead of stepping
over it. IMHO the bug should be fixed but it is not so easy to
do it the clean way since not only alpha specific source must
be modified but also machine independent source is affected.
The two offending functions are:
alpha_start_function() (called by `assemble_start_function()'):
Here, the `ldgp $29,0($27)' gets patched into the compiler output.
final_start_function():
Here the `#.stabn ...' gets generated.
Perhaps another way of fixing the problem would be making the
`#.stabn ...' directly refer to the function's label `f' instead
of `$LM1'.
Greetings
--
Norbert