qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH v2] Use the GDB JIT debugging interface


From: Richard Henderson
Subject: Re: [Qemu-devel] [PATCH v2] Use the GDB JIT debugging interface
Date: Mon, 19 Mar 2012 13:48:09 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:10.0.1) Gecko/20120216 Thunderbird/10.0.1

On 03/19/12 13:08, Peter Maydell wrote:
> In system mode I get a backtrace like this:
> 
> (gdb) bt
> #0  helper_set_cp15 (env=0x80b41500, insn=3993505559, val=0) at
> /home/pm215/src/qemu/qemu/target-arm/helper.c:1455
> #1  0x0101983d in ?? ()
> 
> ...is it possible to put in a useful string to replace that '??'
> in line #1?

I'm not sure.  Maybe, with some more effort.
GDB seems to be ignoring the elf-level symbol table, but reading
the dwarf info.  So it would be possible to add a minimal debug_info
section as well.  "Minimal" is irritatingly large though...

> Any chance of some comments describing (a) what the limited debug
> info does and what this does/doesn't support? [for instance it
> doesn't seem to support doing a gdb backtrace while you're inside
> the code_gen_prologue code] and (b) what the cpu-specific tcg backend
> code needs to do/provide to support this?

Putting this in tcg.c, perhaps?  Sure.

You're right that I don't try to handle code_gen_prologue.
Getting that right is more difficult.  Of course, I doubt
we need to auto-generate the prologue code *at all*.  Some
statically generated assembler would do just as well, at
which point we *could* add .cfi directives to handle that code.

All the cpu-specific tcg backend needs to do is provide the
contents of a .debug_frame section that describes the steady-
state frame established by the prologue.  Since the entire
code_gen_buffer uses this same frame, the unwind is fixed for
the entire buffer.


r~ 




reply via email to

[Prev in Thread] Current Thread [Next in Thread]