]> git.proxmox.com Git - mirror_qemu.git/commit
qemu-gdb: allow using glibc_pointer_guard() on core dumps
authorPaolo Bonzini <pbonzini@redhat.com>
Mon, 12 Oct 2015 08:02:52 +0000 (10:02 +0200)
committerStefan Hajnoczi <stefanha@redhat.com>
Thu, 29 Oct 2015 17:59:26 +0000 (17:59 +0000)
commit1138f24645e9e1e2d55d280caab4e2539dfcdb49
treefd5f95413812b7f0929ae4cfc0ae557162440cac
parent7bc8e0c967a4ef77657174d28af775691e18b4ce
qemu-gdb: allow using glibc_pointer_guard() on core dumps

get_fs_base() cannot be run on a core dump, because it uses the arch_prctl
system call.  The fs base is the value that is returned by pthread_self(),
and it would be nice to just glean it from the "info threads" output:

* 1    Thread 0x7f16a3fff700 (LWP 33642) pthread_cond_wait@@GLIBC_2.3.2 ()
              ^^^^^^^^^^^^^^

but unfortunately the gdb API does not provide that.  Instead, we can
look for the "arg" argument of the start_thread function if glibc debug
information are available.  If not, fall back to the old mechanism.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Message-id: 1444636974-19950-2-git-send-email-pbonzini@redhat.com
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
scripts/qemugdb/coroutine.py