public inbox for gdb@sourceware.org
 help / color / mirror / Atom feed
* powerpc-linux-gdb/gdbserver: breakpoint are set with offset while using Qemu
@ 2012-07-10  7:24 oshri yahav
  0 siblings, 0 replies; only message in thread
From: oshri yahav @ 2012-07-10  7:24 UTC (permalink / raw)
  To: gdb

[-- Attachment #1: Type: text/plain, Size: 1050 bytes --]

Hi all,

I am developing a user space application on P1023RDS development board.
To debug the application I’m using the powerpc-linux-gdb and gedserver
on the board.
When I debug in this way, break-points are placed in the correct
places and I’m able to debug the application.

The problem starts when I’m using Qemu to debug the application.
Since Qemu does not have simulation for P1023RDS I’m using mpc8544ds
as my board since both have e500v2 CPU (I have enabled mpc8544ds
support in the kernel).
To get network connectivity I have also enabled e1000 network card.
When I try to debug in the same manner as described up, the
break-points are being set with offset and the gdbserver never stop on
main.

Build environment:
- Ubuntu 12.04 host.
- buildroot-2012.02 to create the kernel image and the file system.
- Qemu 1.1.0

i have attached the log of gdbserver from both runs.
I use the same debugging configuration and the same images in both ways.

Does anyone have any idea what I’m doing wrong?

Thanks,

Oshri

[-- Attachment #2: P1023RDS-debug.txt --]
[-- Type: text/plain, Size: 4510 bytes --]

# gdbserver --debug :50000 /usr/bin/wifimgr
my_waitpid (1080, 0x0)
my_waitpid (1080, 0x0): status(137f), 1080
my_waitpid (1080, 0x0)
my_waitpid (1080, 0x0): status(1057f), 1080
my_waitpid (1081, 0x0)
my_waitpid (1081, 0x0): status(137f), 1081
my_waitpid (1081, 0x0)
my_waitpid (1081, 0x0): status(9), 1081
my_waitpid (1080, 0x0)
my_waitpid (1080, 0x0): status(117f), 1080
my_waitpid (1080, 0x0)
my_waitpid (1080, 0x0): status(9), 1080
new_argv[0] = "/usr/bin/wifimgr"
Process /usr/bin/wifimgr created; pid = 1082
linux_wait: [Process 1082]
linux_wait_for_lwp: <all threads>
my_waitpid (-1, 0x40000000)
blocking
sigchld_handler
my_waitpid (-1, 0x1): status(57f), 1082
Got an event from 1082 (57f)
pc is 0x48001030
stop pc is 0x48001030
linux_wait_for_lwp: pc is 0x48001030
Hit a non-gdbserver trap event.
wait_for_sigstop: LWP 1082 already stopped
Checking whether LWP 1082 needs to move out of the jump pad...no
linux_wait ret = LWP 1082.1082, 1, 5
Listening on port 50000
handling possible accept event
Remote debugging from host 192.168.1.1
linux_async (0), previous=0
linux_async (0), previous=0
hwait_for_sigstop: LWP 1082 already stopped
Checking whether LWP 1082 needs to move out of the jump pad...no
Writing resume reply for LWP 1082.1082:1

hTrying host libthread_db library: libthread_db.so.1.
Host libthread_db.so.1 resolved to: /lib/libthread_db.so.1.
td_ta_new(): application not linked with libthread
thread_db_load_search returning 0
hTrying host libthread_db library: libthread_db.so.1.
Host libthread_db.so.1 resolved to: /lib/libthread_db.so.1.
td_ta_new(): application not linked with libthread
thread_db_load_search returning 0
hWriting 0 to 0x10000d74
hWriting 7d821008 to 0x10000d74
Writing 7d821008 to 0x10004428
hNeed step over [LWP 1082]? No
pc is 0x48001030
Need step over [LWP 1082]? No, no breakpoint found at 0x48001030
Resuming, no pending status or step over needed
resuming LWP 1082
pc is 0x48001030
Resuming lwp 1082 (continue, signal 0, stop not expected)
  resuming from pc 0x48001030
linux_wait: [<all threads>]
linux_wait_for_lwp: <all threads>
my_waitpid (-1, 0x40000000)
blocking
sigchld_handler
my_waitpid (-1, 0x1): status(57f), 1082
Got an event from 1082 (57f)
pc is 0x10000d74
stop pc is 0x10000d74
linux_wait_for_lwp: pc is 0x10000d74
Hit a non-gdbserver trap event.
wait_for_sigstop: LWP 1082 already stopped
Checking whether LWP 1082 needs to move out of the jump pad...no
linux_wait ret = LWP 1082.1082, 1, 5
Writing resume reply for LWP 1082.1082:1

Trying host libthread_db library: libthread_db.so.1.
Host libthread_db.so.1 resolved to: /lib/libthread_db.so.1.
td_ta_new(): application not linked with libthread
thread_db_load_search returning 0
hWriting 7c290b78 to 0x10000d74
Writing 38000000 to 0x10004428
Need step over [LWP 1082]? No
pc is 0x10000d74
Need step over [LWP 1082]? No, no breakpoint found at 0x10000d74
Resuming, no pending status or step over needed
resuming LWP 1082
pc is 0x10000d74
Resuming lwp 1082 (step, signal 0, stop not expected)
  resuming from pc 0x10000d74
linux_wait: [<all threads>]
linux_wait_for_lwp: sigchld_handler
LWP 1082.1082
my_waitpid (1082, 0x40000000)
my_waitpid (1082, 0x1): status(57f), 1082
Got an event from 1082 (57f)
pc is 0x10000d78
stop pc is 0x10000d78
linux_wait_for_lwp: pc is 0x10000d78
GDB wanted to single-step, reporting event.
Hit a non-gdbserver trap event.
wait_for_sigstop: LWP 1082 already stopped
linux_wait ret = LWP 1082.1082, 1, 5
Writing resume reply for LWP 1082.1082:1

hWriting 7d821008 to 0x10000d74
Writing 7d821008 to 0x10004428
Need step over [LWP 1082]? No
pc is 0x10000d78
Need step over [LWP 1082]? No, no breakpoint found at 0x10000d78
Resuming, no pending status or step over needed
resuming LWP 1082
pc is 0x10000d78
Resuming lwp 1082 (continue, signal 0, stop not expected)
  resuming from pc 0x10000d78
linux_wait: [<all threads>]
linux_wait_for_lwp: <all threads>
my_waitpid (-1, 0x40000000)
blocking
sigchld_handler
my_waitpid (-1, 0x1): status(57f), 1082
Got an event from 1082 (57f)
pc is 0x10004428
stop pc is 0x10004428
linux_wait_for_lwp: pc is 0x10004428
Hit a non-gdbserver trap event.
wait_for_sigstop: LWP 1082 already stopped
Checking whether LWP 1082 needs to move out of the jump pad...no
linux_wait ret = LWP 1082.1082, 1, 5
Writing resume reply for LWP 1082.1082:1

Writing 7c290b78 to 0x10000d74
Writing 38000000 to 0x10004428
h

[-- Attachment #3: QEMU-P1023RDS-debug.txt --]
[-- Type: text/plain, Size: 4605 bytes --]

# gdbserver --debug :50000 /usr/bin/wifimgr 
my_waitpid (922, 0x0)
my_waitpid (922, 0x0): status(137f), 922
my_waitpid (922, 0x0)
my_waitpid (922, 0x0): status(1057f), 922
my_waitpid (923, 0x0)
my_waitpid (923, 0x0): status(137f), 923
my_waitpid (923, 0x0)
my_waitpid (923, 0x0): status(9), 923
my_waitpid (922, 0x0)
my_waitpid (922, 0x0): status(117f), 922
my_waitpid (922, 0x0)
my_waitpid (922, 0x0): status(9), 922
new_argv[0] = "/usr/bin/wifimgr"
Process /usr/bin/wifimgr created; pid = 924
sigchld_handler
linux_wait: [Process 924]
linux_wait_for_lwp: <all threads>
my_waitpid (-1, 0x40000000)
my_waitpid (-1, 0x1): status(57f), 924
Got an event from 924 (57f)
pc is 0x48001030
stop pc is 0x48001030
linux_wait_for_lwp: pc is 0x48001030
Hit a non-gdbserver trap event.
wait_for_sigstop: LWP 924 already stopped
Checking whether LWP 924 needs to move out of the jump pad...no
linux_wait ret = LWP 924.924, 1, 5
Listening on port 50000
handling possible accept event
Remote debugging from host 172.16.1.1
linux_async (0), previous=0
linux_async (0), previous=0
wait_for_sigstop: LWP 924 already stopped
Checking whether LWP 924 needs to move out of the jump pad...no
Writing resume reply for LWP 924.924:1

Trying host libthread_db library: libthread_db.so.1.
Host libthread_db.so.1 resolved to: /lib/libthread_db.so.1.
td_ta_new(): application not linked with libthread
thread_db_load_search returning 0
Trying host libthread_db library: libthread_db.so.1.
Host libthread_db.so.1 resolved to: /lib/libthread_db.so.1.
td_ta_new(): application not linked with libthread
thread_db_load_search returning 0
Writing 0 to 0x10000d74
Writing 7d821008 to 0x10000d74
Writing 7d821008 to 0x10004428
Need step over [LWP 924]? No
pc is 0x48001030
Need step over [LWP 924]? No, no breakpoint found at 0x48001030
Resuming, no pending status or step over needed
resuming LWP 924
pc is 0x48001030
Resuming lwp 924 (continue, signal 0, stop not expected)
  resuming from pc 0x48001030
linux_wait: [<all threads>]
linux_wait_for_lwp: <all threads>
my_waitpid (-1, 0x40000000)
blocking
sigchld_handler
my_waitpid (-1, 0x1): status(57f), 924
Got an event from 924 (57f)
pc is 0x10000d74
stop pc is 0x10000d74
linux_wait_for_lwp: pc is 0x10000d74
Hit a non-gdbserver trap event.
wait_for_sigstop: LWP 924 already stopped
Checking whether LWP 924 needs to move out of the jump pad...no
linux_wait ret = LWP 924.924, 1, 5
Writing resume reply for LWP 924.924:1

Trying host libthread_db library: libthread_db.so.1.
Host libthread_db.so.1 resolved to: /lib/libthread_db.so.1.
td_ta_new(): application not linked with libthread
thread_db_load_search returning 0
Writing 7c290b78 to 0x10000d74
Writing 38000000 to 0x10004428
Need step over [LWP 924]? No
pc is 0x10000d74
Need step over [LWP 924]? No, no breakpoint found at 0x10000d74
Resuming, no pending status or step over needed
resuming LWP 924
pc is 0x10000d74
Resuming lwp 924 (step, signal 0, stop not expected)
  resuming from pc 0x10000d74
linux_wait: [<all threads>]
linux_wait_for_lwp: LWP 924.924
my_waitpid (924, 0x40000000)
blocking
sigchld_handler
my_waitpid (924, 0x1): status(57f), 924
Got an event from 924 (57f)
pc is 0x480cd3cc
stop pc is 0x480cd3cc
linux_wait_for_lwp: pc is 0x480cd3cc
GDB wanted to single-step, reporting event.
Hit a non-gdbserver trap event.
wait_for_sigstop: LWP 924 already stopped
linux_wait ret = LWP 924.924, 1, 5
Writing resume reply for LWP 924.924:1

Writing 7d821008 to 0x10000d74
Writing 7d821008 to 0x10004428
Need step over [LWP 924]? No
pc is 0x480cd3cc
Need step over [LWP 924]? No, no breakpoint found at 0x480cd3cc
Resuming, no pending status or step over needed
resuming LWP 924
pc is 0x480cd3cc
Resuming lwp 924 (continue, signal 0, stop not expected)
  resuming from pc 0x480cd3cc
sigchld_handler
linux_wait: [<all threads>]
linux_wait_for_lwp: <all threads>
my_waitpid (-1, 0x40000000)
my_waitpid (-1, 0x1): status(117f), 924
Got an event from 924 (117f)
pc is 0x480cd3cc
stop pc is 0x480cd3cc
linux_wait_for_lwp: pc is 0x480cd3cc
Ignored signal 17 for LWP 924.
pc is 0x480cd3cc
Resuming lwp 924 (continue, signal 17, stop not expected)
  resuming from pc 0x480cd3cc
sigchld_handler
linux_wait_for_lwp: <all threads>
my_waitpid (-1, 0x40000000)
my_waitpid (-1, 0x1): status(0), 924
Got an event from 924 (0)
LWP 924 exiting
LWP 924 is last lwp of process

Child exited with retcode = 0 

Child exited with status 0
Writing resume reply for LWP 924.924:0

GDBserver exiting
# 

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2012-07-10  7:24 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-07-10  7:24 powerpc-linux-gdb/gdbserver: breakpoint are set with offset while using Qemu oshri yahav

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).