This is the mail archive of the mailing list for the elfutils 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: [tests patchv2] FYI unwinder: tests/ update

On Mon, 02 Dec 2013 11:56:33 +0100, Mark Wielaard wrote:
> Aha. OK. Maybe you could try to force a SIGSEGV in a function with as
> first instruction something like "*(int *) 0x1234 = 0x12345;" though I
> assume that might still move the pc just past this instruction. So just
> keep it as is.

One could define such function in asm() block to prevent any prologue.
But you are right I am not sure if current or future processors really stop at
the first such instruction.

> You did now document this in backtrace-child. But it would not be a bad
> idea to add a little comment to backtrace.c (prepare_thread) to explain
> the intent. It is kind of tricky.

I have put there the block:

/* On x86_64 only:
     PC will get changed to function 'jmp' by backtrace.c function
     prepare_thread.  Then SIGUSR2 will be signalled to backtrace-child
     which will invoke function sigusr2.
     This is all done so that signal interrupts execution of the very first
     instruction of a function.  Properly handled unwind should not slip into
     the previous unrelated function.  */

> Yeah, OK. But if the generation of the core file fails you might want to
> note that separately (or even just SKIP the test).

It still FAILs then but one can figure out it from the tests/*.sh.log file.


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