From: Pedro Alves <palves@redhat.com>
To: John Baldwin <jhb@freebsd.org>
Cc: gdb-patches@sourceware.org
Subject: Re: [PATCH v2 4/6] Use LWP IDs with ptrace register requests on FreeBSD.
Date: Sat, 16 Jan 2016 14:39:00 -0000 [thread overview]
Message-ID: <569A5626.8020507@redhat.com> (raw)
In-Reply-To: <2254480.0h7heLGpvG@ralph.baldwin.cx>
On 01/15/2016 11:22 PM, John Baldwin wrote:
> Ok. I made a pass and fixed the ones that I thought were relevant (i.e.
> generating a pid to pass to ptrace()). However, the vast majority of the
> files changed were various foo-linux-nat.c files which I am not setup to
> test.
Hmm, actually, sorry about that, but I remembered that the ptid_get_lwp()==0
paths in Linux code are dead code (90ad5e1d4f). I see now that d89fa914ad6f
cleaned most of the linux code, but left out the cases that were open coded.
So I think it's best to just leave those be. Someone can always clean
those up to use ptid_get_lwp directly afterwards.
I now think that to move forward with your patch, it's simpler/better to
export get_ptrace_pid, and just use it in the cases you cared about,
and leave other targets as is.
If you're changing the FreeBSD to always store an lwp, do you still
need get_ptrace_pid, or would something like this instead work?
- if (ptrace (PT_GETREGS, ptid_get_pid (inferior_ptid),
+ if (ptrace (PT_GETREGS, get_ptrace_lwp (inferior_ptid),
etc. Or would you still need it because the foo-nat.c files you're
touching are used by other BSDs as well?
> Is there a way to push a branch and have the build bots build it to
> do a test build?
No, sorry.
> (Even then I think those would not cover 'nat' files for
> s390, hppa, etc.) I'm still happy to include this, just want to ensure I
> don't break the build.
> I'm also not sure if changing these files would
> break gdbserver (if gdbserver doesn't include inf-ptrace.o).
gdbserver does not include inf-ptrace.o, but it doesn't use the
gdb/*-nat.c files either. It has its own backends and shares
the gdb/nat/, gdb/common/ and gdb/arch/ files with gdb.
We'd actually like to merge the existing gdbserver/gdb backends
though:
https://sourceware.org/gdb/wiki/Common
Thanks,
Pedro Alves
next prev parent reply other threads:[~2016-01-16 14:39 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-01-13 21:46 [PATCH v2 0/6] Support kernel-backed user threads " John Baldwin
2016-01-13 21:46 ` [PATCH v2 3/6] Display per-thread information for threads in FreeBSD cores John Baldwin
2016-01-14 15:03 ` Pedro Alves
2016-01-15 20:23 ` John Baldwin
2016-01-18 12:27 ` Pedro Alves
2016-01-18 17:06 ` John Baldwin
2016-01-18 17:13 ` Pedro Alves
2016-01-13 21:46 ` [PATCH v2 1/6] Add support to readelf for reading FreeBSD ELF core notes John Baldwin
2016-01-14 5:30 ` Alan Modra
2016-01-14 5:40 ` John Baldwin
2016-01-13 21:46 ` [PATCH v2 6/6] Dump register notes for each thread when generating a FreeBSD core John Baldwin
2016-01-14 15:34 ` Pedro Alves
2016-01-13 21:46 ` [PATCH v2 2/6] Add a psuedosection for the NT_FREEBSD_THRMISC note John Baldwin
2016-01-14 5:30 ` Alan Modra
2016-01-13 21:52 ` [PATCH v2 5/6] Add support for LWP-based threads on FreeBSD John Baldwin
2016-01-14 15:29 ` Pedro Alves
2016-01-15 23:54 ` John Baldwin
2016-01-16 14:47 ` Pedro Alves
2016-01-13 21:52 ` [PATCH v2 4/6] Use LWP IDs with ptrace register requests " John Baldwin
2016-01-14 15:07 ` Pedro Alves
2016-01-15 20:23 ` John Baldwin
2016-01-15 21:41 ` Pedro Alves
2016-01-15 23:54 ` John Baldwin
2016-01-16 14:39 ` Pedro Alves [this message]
2016-01-16 19:17 ` John Baldwin
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=569A5626.8020507@redhat.com \
--to=palves@redhat.com \
--cc=gdb-patches@sourceware.org \
--cc=jhb@freebsd.org \
/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