From: Kaushik Phatak <Kaushik.Phatak@kpitcummins.com>
To: "gdb@sourceware.org" <gdb@sourceware.org>
Cc: "yao@codesourcery.com" <yao@codesourcery.com>
Subject: RE: GDB and gdbserver for CR16 target
Date: Thu, 22 Dec 2011 13:07:00 -0000 [thread overview]
Message-ID: <C6CA53A2A46BA7469348BDBD663AB65820460B2D@KCHJEXMB01.kpit.com> (raw)
Hi,
Continuing with our efforts on the addition of GDB and gdbserver for CR16.
The gdb, running on the host seems to be connecting to the gdbserver as expected.
However, the gdbserver terminates with "Signal 127".
I have added --debug to the gdbserver parameters and "set debug remote 1" to the
gdb host side which gives me some logs. My PC value reads 0xFFFFFFFF which may
be the problem but I am not sure.
Below are the logs from gdbserver side and gdb side. Any inputs as to why the
server exits would be very much appreciated.
Thanks!
gdbserver logs:
# ./gdbserver --debug :2345 test.out
Process test.out created; pid = 105
linux_wait: [Process 105]
linux_wait_for_lwp: <all threads>
my_waitpid (-1, 0x40000000)
blocking
sigchld_handler
my_waitpid (-1, 0x1): status(57f), 105
Got an event from 105 (57f)
stop pc is ffffffff
linux_wait_for_lwp: pc is 0xffffffff
stop pc is ffffffff
stop pc is 0xffffffff
Hit a non-gdbserver breakpoint.
linux_wait ret = LWP 105.105, 1, 5
Listening on port 2345
Remote debugging from host IPADDR
handling possible serial event
Signal 127
# exit
gdb host side log:
(gdb) set debug remote 1
(gdb) target remote IPADDR:2345
Remote debugging using IPADDR:2345
Sending packet: $qSupported#37...Ack
Packet received: PacketSize=3fff;QPassSignals+;qXfer:libraries:read+;qXfer:auxv: read+;qXfer:spu:read+;qXfer:spu:write+;qXfer:siginfo:read+;qXfer:siginfo:write+; qXfer:features:read+;QStartNoAckMode+;qXfer:osdata:read+;multiprocess+;QNonStop+
;qXfer:threads:read+
Packet qSupported (supported-packets) is supported
Sending packet: $QStartNoAckMode#b0...Ack
Packet received: OK
Sending packet: $Hg0#df...Packet received: OK
Sending packet: $qXfer:features:read:target.xml:0,fff#7d...Packet received: E00
Sending packet: $QNonStop:0#8c...Packet received: OK
Sending packet: $?#3f...Packet received: T050f:ffffffff;0e:ffffffff;10:ffffffff;
thread:69;core:0;
Sending packet: $Hc-1#09...Packet received: E01
Sending packet: $qC#b4...Packet received: QC69
Sending packet: $qAttached#8f...Packet received: 0
Packet qAttached (query-attached) is supported
Sending packet: $qOffsets#4b...Packet received: E01
warning: Remote failure reply: E01
0xffffffff in ?? ()
Sending packet: $qSymbol::#5b...Packet received: qSymbol:5f5f707468726561645f746
872656164735f6576656e7473
Packet qSymbol (symbol-lookup) is supported
Sending packet: $qSymbol::5f5f707468726561645f746872656164735f6576656e7473#47...
Packet received: OK
(gdb)
Thanks & Best Regards,
Kaushik Phatak
-----Original Message-----
From: Kaushik Phatak
Sent: 19 December 2011 17:26
To: 'gdb@sourceware.org'
Cc: 'yao@codesourcery.com'
Subject: RE: GDB and gdbserver for CR16 target
Hi,
Thanks for the reply.
>> PTRACE_PEEKUSER is defined in <sys/ptrace.h>.
The default includes from sys seems to generate errors,
linux-low.c:545:15: error: 'PTRACE_ATTACH' undeclared (first use in this function)
linux-low.c:814:11: error: 'PTRACE_DETACH' undeclared (first use in this function)
Also, the ptrace.h that seemed to get included from "runtime/usr/include/asm/"
contains definitions,
#define PTRACE_GETREGS 15
#define PTRACE_SETREGS 16
These were conflicting with /sys/ptrace.h definitions.
Commenting these out, and then including the <sys/ptrace.h> seemed to build
the linux-low.c file.
However, at link time it tried to pass the options "-rdynamic". Can this be
removed safely as this toolchain does not understand this option?
Thanks and Best Regards,
Kaushik Phatak
www.kpitgnutools.com
next reply other threads:[~2011-12-22 13:07 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-12-22 13:07 Kaushik Phatak [this message]
-- strict thread matches above, loose matches on Subject: below --
2012-01-30 4:33 Kaushik Phatak
2012-01-27 3:17 Kaushik Phatak
2011-12-19 11:56 Kaushik Phatak
2011-12-13 12:56 Kaushik Phatak
2011-12-13 13:17 ` Yao Qi
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=C6CA53A2A46BA7469348BDBD663AB65820460B2D@KCHJEXMB01.kpit.com \
--to=kaushik.phatak@kpitcummins.com \
--cc=gdb@sourceware.org \
--cc=yao@codesourcery.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox