* [PATCH/RFA]: New architecture method: regset_from_core_section
@ 2003-10-11 13:05 Mark Kettenis
2003-10-11 14:33 ` Andrew Cagney
2003-10-11 17:41 ` Eli Zaretskii
0 siblings, 2 replies; 6+ messages in thread
From: Mark Kettenis @ 2003-10-11 13:05 UTC (permalink / raw)
To: gdb-patches
This adds a new architecture method that returns a register set
definition based on the name and size of a core file section that we
get from BFD. We had an eleborate discussion on this a while ago, and
in my opinion reached consesus on the approach, so I've checked the
code bits in. Eli, are the doc bits OK?
The future might bring us regset_from_remote and perhaps
regset_from_ptrace_request. We'll see.
Mark
Index: ChangeLog
from Mark Kettenis <kettenis@gnu.org>
* gdbarch.sh (regset_from_core_section): New method.
(struct regset): Declare opaque.
* gdbarch.c, gdbarch.h: Regenerated.
Index: doc/ChangeLog
from Mark Kettenis <kettenis@gnu.org>
* gdbint.texinfo (Target Architecture Definition): Document
regset_from_core_section.
Index: gdbarch.sh
===================================================================
RCS file: /cvs/src/src/gdb/gdbarch.sh,v
retrieving revision 1.276
diff -u -p -r1.276 gdbarch.sh
--- gdbarch.sh 11 Oct 2003 12:05:44 -0000 1.276
+++ gdbarch.sh 11 Oct 2003 12:40:40 -0000
@@ -747,6 +747,10 @@ M:2:ADDRESS_CLASS_NAME_TO_TYPE_FLAGS:int
m:::int:register_reggroup_p:int regnum, struct reggroup *reggroup:regnum, reggroup:::default_register_reggroup_p::0
# Fetch the pointer to the ith function argument.
F::FETCH_POINTER_ARGUMENT:CORE_ADDR:fetch_pointer_argument:struct frame_info *frame, int argi, struct type *type:frame, argi, type
+
+# Return the appropriate register set for a core file section with
+# name SECT_NAME and size SECT_SIZE.
+M:::const struct regset *:regset_from_core_section:const char *sect_name, size_t sect_size:sect_name, sect_size
EOF
}
@@ -851,6 +855,7 @@ struct objfile;
struct minimal_symbol;
struct regcache;
struct reggroup;
+struct regset;
struct disassemble_info;
extern struct gdbarch *current_gdbarch;
Index: doc/gdbint.texinfo
===================================================================
RCS file: /cvs/src/src/gdb/doc/gdbint.texinfo,v
retrieving revision 1.174
diff -u -p -r1.174 gdbint.texinfo
--- doc/gdbint.texinfo 10 Oct 2003 07:08:53 -0000 1.174
+++ doc/gdbint.texinfo 11 Oct 2003 12:40:47 -0000
@@ -3563,6 +3563,12 @@ Convert the value of register @var{reg}
form.
@xref{Target Architecture Definition, , Raw and Virtual Register Representations}.
+@item const struct regset *regset_from_core_section (struct gdbarch * @var{gdbarch}, const char * @var{sect_name}, size_t @var{sect_size})
+@findex regset_from_core_section
+Return the appropriate register set for a core file section with name
+SECT_NAME and size SECT_SIZE.
+
+
@item RETURN_VALUE_ON_STACK(@var{type})
@findex RETURN_VALUE_ON_STACK
@cindex returning structures by value
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH/RFA]: New architecture method: regset_from_core_section
2003-10-11 13:05 [PATCH/RFA]: New architecture method: regset_from_core_section Mark Kettenis
@ 2003-10-11 14:33 ` Andrew Cagney
2003-10-11 22:10 ` Mark Kettenis
2003-10-11 17:41 ` Eli Zaretskii
1 sibling, 1 reply; 6+ messages in thread
From: Andrew Cagney @ 2003-10-11 14:33 UTC (permalink / raw)
To: Mark Kettenis; +Cc: gdb-patches
> The future might bring us regset_from_remote and perhaps
> regset_from_ptrace_request. We'll see.
Can you add this info in the doco as a maintainer note?
Andrew
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH/RFA]: New architecture method: regset_from_core_section
2003-10-11 13:05 [PATCH/RFA]: New architecture method: regset_from_core_section Mark Kettenis
2003-10-11 14:33 ` Andrew Cagney
@ 2003-10-11 17:41 ` Eli Zaretskii
2003-10-18 12:31 ` Mark Kettenis
1 sibling, 1 reply; 6+ messages in thread
From: Eli Zaretskii @ 2003-10-11 17:41 UTC (permalink / raw)
To: Mark Kettenis; +Cc: gdb-patches
> Date: Sat, 11 Oct 2003 15:05:19 +0200 (CEST)
> From: Mark Kettenis <kettenis@chello.nl>
>
> Eli, are the doc bits OK?
Yes, but please fix this small blunder:
> +Return the appropriate register set for a core file section with name
> +SECT_NAME and size SECT_SIZE.
SECT_NAME and SECT_SIZE should be @var{sect_name} and @var{sect_size},
exactly as they apper in the @item line. (You see them in caps in the
Info manual because that's how makeinfo renders @var for text-mode
displays. TeX produces a slanted typeface for that.)
Thanks.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH/RFA]: New architecture method: regset_from_core_section
2003-10-11 14:33 ` Andrew Cagney
@ 2003-10-11 22:10 ` Mark Kettenis
2003-10-11 22:21 ` Andrew Cagney
0 siblings, 1 reply; 6+ messages in thread
From: Mark Kettenis @ 2003-10-11 22:10 UTC (permalink / raw)
To: ac131313; +Cc: gdb-patches
Date: Sat, 11 Oct 2003 10:33:35 -0400
From: Andrew Cagney <ac131313@redhat.com>
> The future might bring us regset_from_remote and perhaps
> regset_from_ptrace_request. We'll see.
Can you add this info in the doco as a maintainer note?
I'll try to cook something up. Any suggestion on where to add it?
Mark
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH/RFA]: New architecture method: regset_from_core_section
2003-10-11 22:10 ` Mark Kettenis
@ 2003-10-11 22:21 ` Andrew Cagney
0 siblings, 0 replies; 6+ messages in thread
From: Andrew Cagney @ 2003-10-11 22:21 UTC (permalink / raw)
To: Mark Kettenis; +Cc: gdb-patches
> Date: Sat, 11 Oct 2003 10:33:35 -0400
> From: Andrew Cagney <ac131313@redhat.com>
>
> > The future might bring us regset_from_remote and perhaps
> > regset_from_ptrace_request. We'll see.
>
> Can you add this info in the doco as a maintainer note?
>
> I'll try to cook something up. Any suggestion on where to add it?
Straight after the description. For instance (from my recent
return_value patch):
+@xref{EXTRACT_STRUCT_VALUE_ADDRESS}, for a description of how
+return-values that use the struct convention are handled.
+
+@emph{Maintainer note: This method replaces separate predicate, extract,
+store methods. By having only one method, the logic needed to determine
+the return-value convention need only be implemented in one place. If
+@value{GDBN} were written in an @sc{oo} language, this method would
+instead return an object that knew how to perform the register
+return-value extract and store.}
Andrew (thanks!)
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH/RFA]: New architecture method: regset_from_core_section
2003-10-11 17:41 ` Eli Zaretskii
@ 2003-10-18 12:31 ` Mark Kettenis
0 siblings, 0 replies; 6+ messages in thread
From: Mark Kettenis @ 2003-10-18 12:31 UTC (permalink / raw)
To: eliz; +Cc: gdb-patches
Date: Sat, 11 Oct 2003 19:37:09 +0200
From: "Eli Zaretskii" <eliz@elta.co.il>
> Date: Sat, 11 Oct 2003 15:05:19 +0200 (CEST)
> From: Mark Kettenis <kettenis@chello.nl>
>
> Eli, are the doc bits OK?
Yes, but please fix this small blunder:
> +Return the appropriate register set for a core file section with name
> +SECT_NAME and size SECT_SIZE.
SECT_NAME and SECT_SIZE should be @var{sect_name} and @var{sect_size},
exactly as they apper in the @item line.
Oops! Corrected. Below is what I actually checked in. I'll submit a
patch adding the maintainer note requested by Andrew later this
weekend.
Thanks,
Mark
Index: doc/ChangeLog
from Mark Kettenis <kettenis@gnu.org>
* gdbint.texinfo (Target Architecture Definition): Document
regset_from_core_section.
Index: doc/gdbint.texinfo
===================================================================
RCS file: /cvs/src/src/gdb/doc/gdbint.texinfo,v
retrieving revision 1.175
diff -u -p -r1.175 gdbint.texinfo
--- doc/gdbint.texinfo 14 Oct 2003 20:23:29 -0000 1.175
+++ doc/gdbint.texinfo 18 Oct 2003 12:25:19 -0000
@@ -3596,6 +3596,12 @@ Convert the value of register @var{reg}
form.
@xref{Target Architecture Definition, , Raw and Virtual Register Representations}.
+@item const struct regset *regset_from_core_section (struct gdbarch * @var{gdbarch}, const char * @var{sect_name}, size_t @var{sect_size})
+@findex regset_from_core_section
+Return the appropriate register set for a core file section with name
+@var{sect_name} and size @var{sect_size}.
+
+
@item RETURN_VALUE_ON_STACK(@var{type})
@findex RETURN_VALUE_ON_STACK
@cindex returning structures by value
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2003-10-18 12:31 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-10-11 13:05 [PATCH/RFA]: New architecture method: regset_from_core_section Mark Kettenis
2003-10-11 14:33 ` Andrew Cagney
2003-10-11 22:10 ` Mark Kettenis
2003-10-11 22:21 ` Andrew Cagney
2003-10-11 17:41 ` Eli Zaretskii
2003-10-18 12:31 ` Mark Kettenis
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox