qemu-devel
[Top][All Lists]
Advanced

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

[Qemu-devel] How to debug coroutine functions on Ubuntu?


From: Dong Xu Wang
Subject: [Qemu-devel] How to debug coroutine functions on Ubuntu?
Date: Tue, 8 May 2012 10:05:09 +0800

While debugging on Ubuntu, I found it's not easy to deal with coroutine functions, but on RH works well.
Could anyone tell me how to solve the problem?  Thanks.

The following is output on my ubuntu:


$ gdb qemu-io
GNU gdb (Ubuntu/Linaro 7.4-2012.04-0ubuntu1) 7.4-2012.04
Copyright (C) 2012 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "i686-linux-gnu".
For bug reporting instructions, please see:
<http://bugs.launchpad.net/gdb-linaro/>...
Reading symbols from /usr/bin/qemu-io...done.
(gdb) set args -c "read -v 0 512" ubuntu.qcow2
(gdb) break qcow2_co_readv
Breakpoint 1 at 0x27bc9: file block/qcow2.c, line 517.
(gdb) r
Starting program: /usr/bin/qemu-io -c "read -v 0 512" ubuntu.qcow2
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/i386-linux-gnu/libthread_db.so.1".
[New Thread 0xb7babb40 (LWP 15993)]

Breakpoint 1, qcow2_co_readv (bs=0x80492508, sector_num=0,
    remaining_sectors=1, qiov=0xbfffeea0) at block/qcow2.c:517
517    {
(gdb) n
518        BDRVQcowState *s = bs->opaque;
(gdb)
522        uint64_t cluster_offset = 0;
(gdb)
523        uint64_t bytes_done = 0;
(gdb)
525        uint8_t *cluster_data = NULL;
(gdb)
527        qemu_iovec_init(&hd_qiov, qiov->niov);
(gdb)
529        qemu_co_mutex_lock(&s->lock);
(gdb)
531        while (remaining_sectors != 0) {
(gdb)
534            cur_nr_sectors = remaining_sectors;
(gdb)
535            if (s->crypt_method) {
(gdb)
540            ret = qcow2_get_cluster_offset(bs, sector_num << 9,
(gdb)
Warning:
Cannot insert breakpoint 0.
Error accessing memory address 0x10114498: Input/output error.

0xb7e9d3a1 in longjmp (env=0x804939b0, val=1)
    at ../nptl/sysdeps/pthread/pt-longjmp.c:26
26    ../nptl/sysdeps/pthread/pt-longjmp.c: No such file or directory.
(gdb)

How can I skip the error report here?


reply via email to

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