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

Re: RFC: Avoid calling XXX_skip_prologue for assembly code


>  "XXX_skip_prologue" functions in the various XXX-tdep.c files do their
>> own checking first to see if the language is assembly, but they don't
>> have easy access to that info, and each of them would have to do
>> something similar to this patch anyway, so it seems more logical to
>> just do the test in one place.
> 
> 
> This seems like a good idea, but I'm told that Red Hat has an
> (as-of-yet unreleased) port which actually analyzes prologues for
> assembly-language functions.  I assume there's some sort of underlying
> ABI that justifies this.

(I'm not sure what is mean by underlying ABI, but anyway.)  This is a 
hard problem.

gdb/testsuite/gdb.asm/ contains GDB's sole assembler test (sigh).  It 
works on the assumption that the target is going to treat ``break main'' 
and ``break *main'' separatly.  The latter stepping into the function to 
the point were the stack frame is valid.  This suggests that the 
behavour is pretty entrenched.  The d10v has the necessary framework for 
the test.  A patch for the h8[35]00 was also submitted but got lost in 
the paper work.

Anyway, I suspect (is this true?) that this patch would make ``break 
vfprintf'' and ``break *vfprintf'' identical.  That in turn could mean 
that a backtrace from a debug info free file such as libc.a:vfprintf() 
might not work.

Andrew



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