This is the mail archive of the 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: [rfa] ARM prologue parsing support for Thumb-2 instructions

Daniel Jacobowitz wrote:
> On Fri, Oct 08, 2010 at 02:54:59PM +0200, Ulrich Weigand wrote:
> > All these are caused by failures to parse the prologues of hand-written
> > *ARM* assembler routines in glibc (system call handlers like nanosleep).
> > These simply deviate too far from the usual rules (e.g. by intermixing
> > stack saving/restoring of registers with conditional branches, or by
> > temporarily saving registers into other registers instead of the stack)
> > for the ARM prologue parser to be able to handle them.
> > 
> > It seems to me that there is not much sense in attempting to support
> > even this type of code.  I guess we should strongly recommend to have
> > (at least) glibc debuginfo files installed if you want to debug.
> I agree with your conclusion.  It's just not worthwhile; either
> install debuginfo files, or leave .debug_frame in the stripped
> libraries.

Hmm, I noticed one set of problems is due to the __libc_do_syscall
function you added in this patch:

	.syntax unified
	.hidden __libc_do_syscall

ENTRY (__libc_do_syscall)
	push	{r7, lr}
	.save	{r7, lr}
	cfi_adjust_cfa_offset (8)
	cfi_rel_offset (r7, 0)
	cfi_rel_offset (lr, 4)
	mov	r7, ip
	swi	0x0
	pop	{r7, pc}
END (__libc_do_syscall)

The GDB prologue parser would actually be easily capable of understanding
this function prologue.  However, it doesn't work because GDB does not even
find the start of the function in the first place, since the symbol is
present only in the regular symbol table (which is stripped), and not in
the dynamic symbol table, because of the ".hidden" directive.

Is there any particular reason why this function could not be at least
.protected instead?

[ Note that this shows up even with glibc debuginfo installed when running
the break-interp.exp test case, because that test uses a copy of
so that GDB doesn't find the install debuginfo any more ... ]


  Dr. Ulrich Weigand
  GNU Toolchain for Linux on System z and Cell BE

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