This is the mail archive of the gdb@sourceware.org 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]

Re: break $function in coff/pe doesn't break exactly before the first statement?


On Sat, Nov 18, 2006 at 03:31:32PM +0000, Pedro Alves wrote:
>     .loc 1 15 0
>     pushl     %ebp
> LCFI0:
>     movl $16, %eax
>     movl %esp, %ebp
> LCFI1:
>     subl $8, %esp
> LCFI2:
>     .loc 1 15 0
>     andl $-16, %esp
>     call __alloca
>     call ___main
>     .loc 1 17 0

> What do you think could be done to fix this?
> Is it the .loc directives that are being output wrong? Or is it gdb's 
> prologue reader
> (if there is such a thing) that is missing the fact that __main is not 
> user code?

Probably both.  The second line number marker normally marks the end of
the prologue, so GCC is wrong, and GDB might have to be taught about
_alloca and __main.

-- 
Daniel Jacobowitz
CodeSourcery


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]