* [RFA] Add comment describing the target_gdbarch global
@ 2009-05-07 0:54 Joel Brobecker
2009-05-07 12:09 ` Ulrich Weigand
0 siblings, 1 reply; 5+ messages in thread
From: Joel Brobecker @ 2009-05-07 0:54 UTC (permalink / raw)
To: uweigand, gdb-patches
[-- Attachment #1: Type: text/plain, Size: 530 bytes --]
Hello,
I remember a few months ago when I stumbled across a piece of code
using target_gdbarch, and I couldn't remember what this global was,
and what the different was with gdbarch. I eventually found the
original discussion again
(http://sourceware.org/ml/gdb-patches/2008-08/msg00358.html)
but I think a comment would be nice. I'm finally writing one today.
Does this look accurate?
2009-05-06 Joel Brobecker <brobecker@adacore.com>
* gdbarch.h (target_gdbarch): Add comment documenting this global.
--
Joel
[-- Attachment #2: comment.diff --]
[-- Type: text/x-diff, Size: 851 bytes --]
diff --git a/gdb/gdbarch.h b/gdb/gdbarch.h
index 5e508d7..31c935f 100644
--- a/gdb/gdbarch.h
+++ b/gdb/gdbarch.h
@@ -54,6 +54,17 @@ struct displaced_step_closure;
struct core_regset_section;
extern struct gdbarch *current_gdbarch;
+
+/* The architecture associated with the connection to the target.
+
+ The architecture vector provides some information that is really
+ a property of the target: The layout of certain packets, for instance;
+ or the solib_ops vector. Etc. To differentiate architecture accesses
+ to per-target properties to per-thread/pre-frame/per-objfile properties,
+ accesses to per-target properties should be made through target_gdbarch.
+
+ Eventually, when support for multiple targets is implemented in
+ GDB, this global should be made target-specific. */
extern struct gdbarch *target_gdbarch;
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [RFA] Add comment describing the target_gdbarch global
2009-05-07 0:54 [RFA] Add comment describing the target_gdbarch global Joel Brobecker
@ 2009-05-07 12:09 ` Ulrich Weigand
2009-05-07 14:53 ` Joel Brobecker
0 siblings, 1 reply; 5+ messages in thread
From: Ulrich Weigand @ 2009-05-07 12:09 UTC (permalink / raw)
To: Joel Brobecker; +Cc: gdb-patches
Joel Brobecker wrote:
> I remember a few months ago when I stumbled across a piece of code
> using target_gdbarch, and I couldn't remember what this global was,
> and what the different was with gdbarch. I eventually found the
> original discussion again
>
> (http://sourceware.org/ml/gdb-patches/2008-08/msg00358.html)
>
> but I think a comment would be nice. I'm finally writing one today.
> Does this look accurate?
>
> 2009-05-06 Joel Brobecker <brobecker@adacore.com>
>
> * gdbarch.h (target_gdbarch): Add comment documenting this global.
This looks fine to me.
Thanks,
Ulrich
--
Dr. Ulrich Weigand
GNU Toolchain for Linux on System z and Cell BE
Ulrich.Weigand@de.ibm.com
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [RFA] Add comment describing the target_gdbarch global
2009-05-07 12:09 ` Ulrich Weigand
@ 2009-05-07 14:53 ` Joel Brobecker
2009-05-14 14:00 ` Ulrich Weigand
0 siblings, 1 reply; 5+ messages in thread
From: Joel Brobecker @ 2009-05-07 14:53 UTC (permalink / raw)
To: Ulrich Weigand; +Cc: gdb-patches
[-- Attachment #1: Type: text/plain, Size: 362 bytes --]
> > 2009-05-06 Joel Brobecker <brobecker@adacore.com>
> >
> > * gdbarch.h (target_gdbarch): Add comment documenting this global.
>
> This looks fine to me.
Excellent! Thanks for double-checking. I committed the patch after
having fixed a couple of typos. Patch attached for reference, but
basically a "pre" -> "per", and a "to" -> "from".
--
Joel
[-- Attachment #2: comment.diff --]
[-- Type: text/x-diff, Size: 853 bytes --]
diff --git a/gdb/gdbarch.h b/gdb/gdbarch.h
index 5e508d7..31c935f 100644
--- a/gdb/gdbarch.h
+++ b/gdb/gdbarch.h
@@ -54,6 +54,17 @@ struct displaced_step_closure;
struct core_regset_section;
extern struct gdbarch *current_gdbarch;
+
+/* The architecture associated with the connection to the target.
+
+ The architecture vector provides some information that is really
+ a property of the target: The layout of certain packets, for instance;
+ or the solib_ops vector. Etc. To differentiate architecture accesses
+ to per-target properties from per-thread/per-frame/per-objfile properties,
+ accesses to per-target properties should be made through target_gdbarch.
+
+ Eventually, when support for multiple targets is implemented in
+ GDB, this global should be made target-specific. */
extern struct gdbarch *target_gdbarch;
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [RFA] Add comment describing the target_gdbarch global
2009-05-07 14:53 ` Joel Brobecker
@ 2009-05-14 14:00 ` Ulrich Weigand
2009-05-14 19:19 ` Joel Brobecker
0 siblings, 1 reply; 5+ messages in thread
From: Ulrich Weigand @ 2009-05-14 14:00 UTC (permalink / raw)
To: Joel Brobecker; +Cc: gdb-patches
Joel Brobecker wrote:
> > > 2009-05-06 Joel Brobecker <brobecker@adacore.com>
> > >
> > > * gdbarch.h (target_gdbarch): Add comment documenting this global.
> >
> > This looks fine to me.
>
> Excellent! Thanks for double-checking. I committed the patch after
> having fixed a couple of typos. Patch attached for reference, but
> basically a "pre" -> "per", and a "to" -> "from".
Oops, I didn't notice that you're changing gdbarch.h directly.
This is a generated file; you should be changing gdbarch.sh
instead and regnerate the header file ...
Bye,
Ulrich
--
Dr. Ulrich Weigand
GNU Toolchain for Linux on System z and Cell BE
Ulrich.Weigand@de.ibm.com
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [RFA] Add comment describing the target_gdbarch global
2009-05-14 14:00 ` Ulrich Weigand
@ 2009-05-14 19:19 ` Joel Brobecker
0 siblings, 0 replies; 5+ messages in thread
From: Joel Brobecker @ 2009-05-14 19:19 UTC (permalink / raw)
To: Ulrich Weigand; +Cc: gdb-patches
[-- Attachment #1: Type: text/plain, Size: 943 bytes --]
> > 2009-05-06 Joel Brobecker <brobecker@adacore.com>
> >
> > * gdbarch.h (target_gdbarch): Add comment documenting this global.
>
> Oops, I didn't notice that you're changing gdbarch.h directly.
> This is a generated file; you should be changing gdbarch.sh
> instead and regnerate the header file ...
(head shaking) This is really a rookie mistake. I can't believe I wasn't
paying more attention. Sorry about that!!!
Fixed thusly:
2009-05-14 Joel Brobecker <brobecker@adacore.com>
* gdbarch.sh: Add comment documenting the target_gdbarch global.
gdbarch.h does NOT need to be regenerated as the corresponding
change has already been made in a previous commit.
As explained in the ChangeLog, I reran gdbarch.sh, and it generated
the exact same files.
Checked in.
--
Joel
PS: I'll review your Ada patches tomorrow morning (it's getting
too late for me, now). But thanks much for sending them.
[-- Attachment #2: gdbarch.diff --]
[-- Type: text/x-diff, Size: 1017 bytes --]
Index: gdbarch.sh
===================================================================
RCS file: /cvs/src/src/gdb/gdbarch.sh,v
retrieving revision 1.487
diff -u -p -r1.487 gdbarch.sh
--- gdbarch.sh 30 Apr 2009 02:52:16 -0000 1.487
+++ gdbarch.sh 14 May 2009 19:13:43 -0000
@@ -850,6 +850,17 @@ struct displaced_step_closure;
struct core_regset_section;
extern struct gdbarch *current_gdbarch;
+
+/* The architecture associated with the connection to the target.
+
+ The architecture vector provides some information that is really
+ a property of the target: The layout of certain packets, for instance;
+ or the solib_ops vector. Etc. To differentiate architecture accesses
+ to per-target properties from per-thread/per-frame/per-objfile properties,
+ accesses to per-target properties should be made through target_gdbarch.
+
+ Eventually, when support for multiple targets is implemented in
+ GDB, this global should be made target-specific. */
extern struct gdbarch *target_gdbarch;
EOF
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2009-05-14 19:19 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-05-07 0:54 [RFA] Add comment describing the target_gdbarch global Joel Brobecker
2009-05-07 12:09 ` Ulrich Weigand
2009-05-07 14:53 ` Joel Brobecker
2009-05-14 14:00 ` Ulrich Weigand
2009-05-14 19:19 ` Joel Brobecker
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox