From: Weimin Pan <weimin.pan@oracle.com>
To: <palves@redhat.com>
Cc: <qiyaoltc@gmail.com>, <gdb-patches@sourceware.org>
Subject: Re: [PING] [PATCH v3] gdb: ADI support
Date: Wed, 12 Jul 2017 00:36:00 -0000 [thread overview]
Message-ID: <98885f9a-7c06-4ab5-b9a2-342277839cc4@default> (raw)
Simply using target_fileio_xxx routines to replace their
corresponding open/pread64/pwrite64/close calls, as you
suggested, does solve the cross-referencing problem.
The cross gdb build for all targets was then retried and
was successful.
Thanks much.
----- Original Message -----
From: palves@redhat.com
To: weimin.pan@oracle.com, qiyaoltc@gmail.com
Cc: gdb-patches@sourceware.org
Sent: Tuesday, July 11, 2017 5:21:26 AM GMT -08:00 US/Canada Pacific
Subject: Re: [PING] [PATCH v3] gdb: ADI support
On 07/11/2017 03:56 AM, Wei-min Pan wrote:
> With your comments like:
> * You can't access /proc in *-tdep.c file, because it is also compiled for
> cross-debugger (from previous review);
> * We can't include "nat.h" in "tdep.c";
> * Calling pread64 in -tdep.c makes few sense to me. If you only want to
> support native debugging, move them to -nat.c file.
>
> I now believe that the ADI support should be in sparc6 4-linux-nat.c,
> not sparc64-tdep.c. Doing so also makes cross gdb build a non-issue.
Please don't leave remote debugging out of the design.
I.e., remote debugging against gdbserver.
You were reading some /proc files with target_fileio, like:
snprintf (filename, sizeof filename, "/proc/%d/adi/maps", pid);
char *data = target_fileio_read_stralloc (NULL, filename);
and that should work against gdbserver. (It'll read the remote
target file when remote debugging.) So one way would be to
replace open/pread64/close etc calls with calls to corresponding
target_fileio_xxx routines.
Alternatively (or in addition) defining new "enum target_object"
objects, and then using the target_xfer_partial interface may
make sense. (I really haven't studied the code in any detail
to tell, but it should be a useful pointer, regardless.)
Thanks,
Pedro Alves
next reply other threads:[~2017-07-12 0:36 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-07-12 0:36 Weimin Pan [this message]
2017-07-12 0:43 ` Pedro Alves
2017-07-12 3:25 ` Wei-min Pan
-- strict thread matches above, loose matches on Subject: below --
2017-07-06 18:36 Weimin Pan
2017-07-10 10:38 ` Yao Qi
2017-07-11 2:56 ` Wei-min Pan
2017-07-11 8:21 ` Yao Qi
2017-07-11 12:21 ` Pedro Alves
2017-07-14 2:33 ` Wei-min Pan
2017-07-14 11:40 ` 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=98885f9a-7c06-4ab5-b9a2-342277839cc4@default \
--to=weimin.pan@oracle.com \
--cc=gdb-patches@sourceware.org \
--cc=palves@redhat.com \
--cc=qiyaoltc@gmail.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