From: Pedro Alves <palves@redhat.com>
To: Yao Qi <qiyaoltc@gmail.com>, Wei-min Pan <weimin.pan@oracle.com>
Cc: gdb-patches@sourceware.org
Subject: Re: [PATCH v2] gdb: ADI support
Date: Wed, 21 Jun 2017 10:11:00 -0000 [thread overview]
Message-ID: <d9497a8a-963a-b0a4-1d5a-0796cac58810@redhat.com> (raw)
In-Reply-To: <86d19xhdv0.fsf@gmail.com>
On 06/21/2017 10:46 AM, Yao Qi wrote:
> Wei-min Pan <weimin.pan@oracle.com> writes:
>
>
>>>
>>> You can't access /proc in *-tdep.c file, because it is also compiled for
>>> cross-debugger. The rule in general is to move it to sparc64-linux-nat.c.
>>>
>> It's nice to know. Will look into it. BTW is there any document that
>> specifies/defines these rules for
>> *-tdep.c and *-nat.c files?
>
> I was puzzled by this for several years when I started on GDB :) The
> most relevant one is
> https://sourceware.org/gdb/wiki/Internals%20Native-Debugging In short,
> anything required in native debugging (gdb and program are running on
> the same machine) should be put in *-nat.c. The rest of things related
> to this arch should be put into *-tdep.c. Note some ports have
> *-linux-nat.c and *-linux-tdep.c, the former is about anything required
> in Linux native debugging (gdb and the program is running on the same Linux
> machine), while the latter is about debugging a program running on Linux
> of that arch.
>
There's also:
https://sourceware.org/gdb/wiki/Internals/Source%20Tree%20Structure
I've extended the tdep section a bit now, and added something about
unit tests too, while at it:
https://sourceware.org/gdb/wiki/Internals/Source%20Tree%20Structure?action=diff&rev1=7&rev2=8
Thanks,
Pedro Alves
next prev parent reply other threads:[~2017-06-21 10:11 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-06-16 23:37 Weimin Pan
2017-06-20 13:35 ` Yao Qi
2017-06-20 17:50 ` Wei-min Pan
2017-06-21 9:47 ` Yao Qi
2017-06-21 10:11 ` Pedro Alves [this message]
2017-06-21 16:22 ` Wei-min Pan
2017-06-21 16:42 ` Yao Qi
2017-06-27 0:44 Weimin Pan
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=d9497a8a-963a-b0a4-1d5a-0796cac58810@redhat.com \
--to=palves@redhat.com \
--cc=gdb-patches@sourceware.org \
--cc=qiyaoltc@gmail.com \
--cc=weimin.pan@oracle.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