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: Peter Maydell
Subject: Re: [Qemu-devel] [PATCH v2] Use the GDB JIT debugging interface
Date: Mon, 19 Mar 2012 20:08:19 +0000

On 19 March 2012 19:25, Richard Henderson <address@hidden> wrote:
> I was reminded about this from a comment on the list, where
> a new developer had gotten confused by our backtrace.

This is neat.

> Example:
>
> Breakpoint 1, helper_idivl_EAX (t0=512)
>    at /home/rth/work/qemu/qemu/target-i386/op_helper.c:1882
> 1882    {
> (gdb) where
> #0  helper_idivl_EAX (t0=512)
>    at /home/rth/work/qemu/qemu/target-i386/op_helper.c:1882
> #1  0x00005555557c0fdf in static_code_gen_buffer ()
> #2  0x000055555559714d in cpu_x86_exec (env=0x5555577fba30)
>    at /home/rth/work/qemu/qemu/cpu-exec.c:564
> #3  0x00005555555b3290 in cpu_loop (env=0x5555577fba30)
>    at /home/rth/work/qemu/qemu/linux-user/main.c:317
> #4  0x00005555555b40a4 in main (argc=<optimized out>, argv=<optimized out>,
>    envp=<optimized out>) at /home/rth/work/qemu/qemu/linux-user/main.c:3826

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 ?? ()
#2  0x8020bec3 in cpu_arm_exec (env=0x80b41500) at
/home/pm215/src/qemu/qemu/cpu-exec.c:564
#3  0x8020e978 in tcg_cpu_exec (env=0x80b41500) at
/home/pm215/src/qemu/qemu/cpus.c:1022
#4  0x8020eab8 in tcg_exec_all () at /home/pm215/src/qemu/qemu/cpus.c:1054
#5  0x8020df8f in qemu_tcg_cpu_thread_fn (arg=0x80b41500) at
/home/pm215/src/qemu/qemu/cpus.c:772
#6  0x003bcd31 in start_thread (arg=0xaeecdb70) at pthread_create.c:304
#7  0x0089d46e in clone () at ../sysdeps/unix/sysv/linux/i386/clone.S:130
Backtrace stopped: Not enough registers or memory available to unwind further

...is it possible to put in a useful string to replace that '??'
in line #1?

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?

thanks
-- PMM



reply via email to

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