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: Mon, 19 Dec 2011 11:56:00 -0000 [thread overview]
Message-ID: <C6CA53A2A46BA7469348BDBD663AB6582045D034@KCHJEXMB01.kpit.com> (raw)
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
-----Original Message-----
From: Kaushik Phatak
Sent: 13 December 2011 18:26
To: 'gdb@sourceware.org'
Subject: GDB and gdbserver for CR16 target
Hi,
We are currently adding a GDB port for the CR16 target architecture.
The run simulator port for CR16 is already present in the main line.
Currently, we have build a basic GDB that would work along with sim and we are trying
to build the GDB server for cr16-uclinux-gcc but I am facing some issues.
I have changed #include <sys/ptrace.h> to #include <linux/ptrace.h> which contains
defines for ptrace system calls.
I am getting following errors while compiling linux-low.c
linux-low.c:2171:10: error: 'PTRACE_PEEKUSER' undeclared (first use in this function)
linux-low.c:2244:12: error: 'PTRACE_POKEUSER' undeclared (first use in this function)
The ptrace.h file contains similar definitions,
#define PTRACE_PEEKUSR 3
#define PTRACE_POKEUSR 6
Is this like a typo or am I including the incorrect file?
Any pointers would be very much appreciated.
Thanks and Best Regards,
Kaushik Phatak
www.kpitgnutools.com
next reply other threads:[~2011-12-19 11:56 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-12-19 11:56 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-22 13:07 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=C6CA53A2A46BA7469348BDBD663AB6582045D034@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