From: "Ulrich Weigand" <uweigand@de.ibm.com>
To: palves@redhat.com (Pedro Alves)
Cc: gdb-patches@sourceware.org, jan.kratochvil@redhat.com,
sergiodj@redhat.com
Subject: Re: [rfc] Options for "info mappings" etc. (Re: [PATCH] Implement new `info core mappings' command)
Date: Wed, 11 Jan 2012 18:32:00 -0000 [thread overview]
Message-ID: <201201111753.q0BHrjaU004586@d06av02.portsmouth.uk.ibm.com> (raw)
In-Reply-To: <4F0DB2F6.7050807@redhat.com> from "Pedro Alves" at Jan 11, 2012 04:04:06 PM
Pedro Alves wrote:
> On 01/09/2012 03:43 PM, Ulrich Weigand wrote:
> > - We say instead that, yes, we *want* OS PIDs to be used as first-
> > class user interface elements. But this means to me that we
> > need to more generally make OS PIDs present in GDB common code
> > so that common code is at least able to associate its internal
> > notions of "inferior" with those IDs. At a minimum, this would
> > imply we no longer consider "ptid_t" values to be opaque to
> > GDB common code, but rather enforce that they agree with user-
> > visible OS PID values.
>
> Note that I'm not talking about the notion of a "process id" escape
> escape to common/core code, but only to the linux gdbarch/osabi
> specific bits; or other code that can deal with it, guarded by
> "is there a notion of a process id on this target.
Ah, I see. OK, I guess this make sense ...
> > I don't quite understand what you mean here. Could you elaborate
> > how you propose to implement this routine "return the target process
> > ID of a given GDB inferior/thread" without remote interface changes?
> > This was exactly the "magic 42000" problem I was running into ...
>
> As mentioned before, by broadcasting support for multi-process extensions
> even with "target remote" (but don't allow debugging multiple processes),
> and defaulting to assume a 1:1 mapping between target process id
> and RSP process id, until some target needs to do something else, at
> which point we define a new packet.
OK, that was the piece I was missing. Yes, if we enable the multi-process
extension, that should work.
> I've spent a bit today prototyping /proc access this way the way
> I was imagining it. See the attached patch series. This is far from
> complete. It's just enough to get something working.
Ah, thanks! I should have posted my work-in-progress patch series;
I had already implemented most of what's in your patches, except for
the process-id bits. Sorry for causing you extra work!
So, both the features:
- enable multi-process extension to get better PID
- have an inferior flag to specify whether the PID is "fake" or
corresponds to a target PID
make sense to me, and looks like they should be enabled anyway. If we
can then implement /proc access without any further protocol extension,
I don't really have any objection ...
I'll integrate your suggestions with my WIP patches and see how far
I get.
> > I must admit I don't see what the benefit of this is supposed to be.
> > This seems to me to be the exact use case that "annex" is there to
> > cover: a bunch of information with related content semantics, which
> > are all accessed the same way, and the exact set is somewhat dynamic.
> > Not using the annex would mean defining a whole bunch of new packet
> > types, duplicated boilerplate code in GDB and gdbserver to hook them
> > up, and then still the drawback that every new /proc file that may
> > come up in the future will require extra code (including new gdbserver-side
> > code!) to support. And for all those drawbacks, I don't see any single
> > benefit ... Maybe you can elaborate?
>
> - Decoupling of the objects in question from a "/proc" idea, so they
> can be more generally used in other scenarios, like e.g., a remote
> protocol implementation of target_pid_to_str (TARGET_OBJECT_PROC/exe).
> - Let GDB have a finer grained idea of what subset of /proc-ish objects
> are supported upfront (through qSupported), without any new mechanism.
I still don't quite see why we cannot do the same with using the annex.
In both cases, users in GDB would do some form of target_read and check
the error code; the only difference is whether they use TARGET_OBJECT_PROC
with a non-NULL annex, or else TARGET_OBJECT_PROC_xxx without annex.
But I guess if we don't do TARGET_OBJECT_PROC at all it doesn't matter.
Bye,
Ulrich
--
Dr. Ulrich Weigand
GNU Toolchain for Linux on System z and Cell BE
Ulrich.Weigand@de.ibm.com
next prev parent reply other threads:[~2012-01-11 17:54 UTC|newest]
Thread overview: 83+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-10-26 21:08 [PATCH] Implement new `info core mappings' command Sergio Durigan Junior
2011-10-26 21:25 ` Sergio Durigan Junior
2011-10-27 7:30 ` Eli Zaretskii
2011-10-27 18:09 ` Sergio Durigan Junior
2011-10-29 19:48 ` Eli Zaretskii
2011-10-31 0:34 ` Jan Kratochvil
2011-10-31 7:00 ` Sergio Durigan Junior
2011-10-31 8:13 ` Jan Kratochvil
2011-10-31 12:57 ` Pedro Alves
2011-11-01 11:54 ` [patch] `info proc ' completion [Re: [PATCH] Implement new `info core mappings' command] Jan Kratochvil
2011-11-01 16:23 ` Eli Zaretskii
2011-11-03 14:12 ` [patch] `info proc *' help fix [Re: [patch] `info proc ' completion] Jan Kratochvil
2011-11-03 16:57 ` Eli Zaretskii
2011-11-03 17:07 ` Jan Kratochvil
2011-11-03 18:08 ` Eli Zaretskii
2011-11-03 18:25 ` Jan Kratochvil
2011-11-02 18:30 ` [patch] `info proc ' completion [Re: [PATCH] Implement new `info core mappings' command] Pedro Alves
2011-11-02 18:48 ` [commit] " Jan Kratochvil
2011-11-03 20:01 ` [PATCH] Implement new `info core mappings' command Sergio Durigan Junior
2011-11-04 10:38 ` Eli Zaretskii
2011-11-04 16:27 ` Jan Kratochvil
2011-11-08 1:49 ` Sergio Durigan Junior
2011-11-08 21:47 ` Jan Kratochvil
2011-11-09 20:32 ` Jan Kratochvil
2011-11-16 4:10 ` Sergio Durigan Junior
2011-11-21 16:15 ` Sergio Durigan Junior
2011-11-23 16:32 ` [rfc] Options for "info mappings" etc. (Re: [PATCH] Implement new `info core mappings' command) Ulrich Weigand
2011-11-23 23:37 ` Sergio Durigan Junior
2011-12-01 19:51 ` Ulrich Weigand
2011-12-05 12:59 ` Pedro Alves
2011-12-05 15:02 ` Ulrich Weigand
2011-12-06 16:01 ` Pedro Alves
2011-12-06 17:19 ` Ulrich Weigand
2011-12-07 16:29 ` Pedro Alves
2011-12-07 17:24 ` Pedro Alves
2011-12-07 20:14 ` Ulrich Weigand
2011-12-09 13:28 ` Pedro Alves
2011-12-09 14:10 ` Pedro Alves
2011-12-20 23:08 ` Ulrich Weigand
2011-12-21 22:36 ` Jan Kratochvil
2011-12-22 16:15 ` Ulrich Weigand
2012-01-05 16:02 ` Pedro Alves
2012-01-05 18:03 ` Ulrich Weigand
2012-01-05 18:20 ` Pedro Alves
2012-01-05 19:54 ` Ulrich Weigand
2012-01-06 6:41 ` Joel Brobecker
2012-01-06 12:29 ` Pedro Alves
2012-01-06 12:27 ` Pedro Alves
2012-01-09 15:44 ` Ulrich Weigand
2012-01-11 16:38 ` Pedro Alves
2012-01-11 18:32 ` Ulrich Weigand [this message]
2012-01-05 18:37 ` Mark Kettenis
2012-01-05 19:35 ` Ulrich Weigand
-- strict thread matches above, loose matches on Subject: below --
2012-04-06 3:28 [PATCH 0/4 v2] Implement support for SystemTap probes on userspace Sergio Durigan Junior
2012-04-06 3:32 ` [PATCH 1/4 v2] Refactor internal variable mechanism Sergio Durigan Junior
2012-04-06 3:36 ` [PATCH 2/4 v2] Implement new features needed for handling SystemTap probes Sergio Durigan Junior
2012-04-11 19:06 ` Jan Kratochvil
2012-04-11 22:14 ` Sergio Durigan Junior
2012-04-11 23:33 ` Jan Kratochvil
2012-04-06 3:37 ` [PATCH 4/4 v2] Documentation and testsuite changes Sergio Durigan Junior
2012-04-06 9:27 ` Eli Zaretskii
2012-04-09 21:37 ` Sergio Durigan Junior
2012-04-06 4:11 ` [PATCH 3/4 v2] Use longjmp and exception probes when available Sergio Durigan Junior
2011-04-04 3:09 [PATCH 4/6] Implement support for SystemTap probes Sergio Durigan Junior
2011-04-04 19:06 ` Eli Zaretskii
2011-04-06 20:20 ` Tom Tromey
2011-04-06 20:52 ` Sergio Durigan Junior
2011-04-07 2:41 ` Yao Qi
2011-04-07 3:32 ` Sergio Durigan Junior
2011-04-07 17:04 ` Tom Tromey
2011-04-11 3:21 ` Yao Qi
2011-04-08 12:38 ` Sergio Durigan Junior
2011-04-11 3:52 ` Yao Qi
2011-08-12 15:45 ` Jan Kratochvil
2011-08-12 17:22 ` Frank Ch. Eigler
2011-08-12 21:33 ` Sergio Durigan Junior
2011-04-19 16:42 ` Jan Kratochvil
2012-05-07 19:36 ` Jan Kratochvil
2012-05-07 19:54 ` Sergio Durigan Junior
2012-05-07 19:58 ` Jan Kratochvil
2012-05-07 20:26 ` Sergio Durigan Junior
2012-05-07 20:38 ` Jan Kratochvil
2012-05-08 1:36 ` Sergio Durigan Junior
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=201201111753.q0BHrjaU004586@d06av02.portsmouth.uk.ibm.com \
--to=uweigand@de.ibm.com \
--cc=gdb-patches@sourceware.org \
--cc=jan.kratochvil@redhat.com \
--cc=palves@redhat.com \
--cc=sergiodj@redhat.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