Re: [commit] New function gdbarch_infi_fill

Andrew Cagney
2003-11-10T16:19:08Z

[-- Attachment #1: Type: text/plain, Size: 728 bytes --]

> On Sun, Nov 09, 2003 at 06:50:54PM -0500, Andrew Cagney wrote:
>
>> Hello,
>>
>> The attached adds the new function gdbarch_info_fill. This new function
>> fills in un-initialized fields of the "info" structure using global
>> "set" variables and the "gdbarch" parameter.
>>
>> committed,
>> Andrew
>
>
> Yeah! I've wanted this before. Though now I can't remember why.

This all begs two questions.

Should gdbarch_info be filled in first?

Should the assertion:

gdbarch_find_by_info (gdbarch_info (gdbarch)) == gdbarch

always hold? At present architectures like the MIPS make this very hard
- keying off information found in the BFD and not the corresponding
info struct.

> "Similar to".

Fixed.

Andrew

[-- Attachment #2: diffs --]
[-- Type: text/plain, Size: 1424 bytes --]

2003-11-10 Andrew Cagney <cagney@redhat.com>

* arch-utils.h, arch-utils.c: Fix typo in comment.

Index: arch-utils.c
===================================================================
RCS file: /cvs/src/src/gdb/arch-utils.c,v
retrieving revision 1.105
diff -u -r1.105 arch-utils.c
--- arch-utils.c 10 Nov 2003 16:03:26 -0000 1.105
+++ arch-utils.c 10 Nov 2003 16:16:22 -0000
@@ -686,7 +686,7 @@
info->osabi = GDB_OSABI_UNINITIALIZED;
}

-/* Similar it init, but this time fill in the blanks. Information is
+/* Similar to init, but this time fill in the blanks. Information is
obtained from the specified architecture, global "set ..." options,
and explicitly initialized INFO fields. */

Index: arch-utils.h
===================================================================
RCS file: /cvs/src/src/gdb/arch-utils.h,v
retrieving revision 1.61
diff -u -r1.61 arch-utils.h
--- arch-utils.h 9 Nov 2003 23:52:28 -0000 1.61
+++ arch-utils.h 10 Nov 2003 16:16:22 -0000
@@ -153,7 +153,7 @@
default values are not zero. */
extern void gdbarch_info_init (struct gdbarch_info *info);

-/* Similar it init, but this time fill in the blanks. Information is
+/* Similar to init, but this time fill in the blanks. Information is
obtained from the specified architecture, global "set ..." options,
and explicitly initialized INFO fields. */
extern void gdbarch_info_fill (struct gdbarch *gdbarch,