This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
Re: [commit] s/extract_address/.../ for *lang*
- From: Joel Brobecker <brobecker at gnat dot com>
- To: Andrew Cagney <ac131313 at redhat dot com>
- Cc: gdb-patches at sources dot redhat dot com
- Date: Fri, 6 Jun 2003 16:23:11 -0700
- Subject: Re: [commit] s/extract_address/.../ for *lang*
- References: <3ECEE0D2.3060302@redhat.com>
Hello Andrew,
> 2003-05-23 Andrew Cagney <cagney@redhat.com>
>
> * p-valprint.c (pascal_val_print): Replace extract_address with
> the inline equivalent extract_unsigned_integer.
> * jv-valprint.c (java_value_print): Ditto.
> * ada-valprint.c (ada_val_print_1): Ditto.
> * ada-lang.h (EXTRACT_ADDRESS): Ditto.
FYI: we decide to replace these extract_address calls with calls to
extract_typed_address, using the builtin_type_void_data_ptr, vis:
<<
@@ -821,8 +820,8 @@ ada_val_print_1 (struct type *type, char
{
fprintf_filtered (stream, "@");
print_address_numeric
- (extract_address (valaddr,
- TARGET_PTR_BIT / HOST_CHAR_BIT), 1, stream);
+ (extract_typed_address (valaddr, builtin_type_void_data_ptr),
+ 1, stream);
if (deref_ref)
fputs_filtered (": ", stream);
}
>>
As a bonus, we got rid of this bizarre division of a target size by
a host size (unless there is a logic that escapes me - but I think it
was just a mindless typo on our part)
--
Joel