Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* [rfc] [3/6] Remove macro TARGET_CHAR_SIGNED
@ 2007-05-29  7:22 Markus Deuling
  2007-05-30 21:15 ` Jim Blandy
  0 siblings, 1 reply; 2+ messages in thread
From: Markus Deuling @ 2007-05-29  7:22 UTC (permalink / raw)
  To: GDB Patches; +Cc: Ulrich Weigand

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

Hello,

this patch removes TARGET_CHAR_SIGNED macro from gdbarch.sh.

ChangeLog:

	* gdbarch.sh (TARGET_CHAR_SIGNED): Replace by gdbarch_char_signed.
	* gdbtypes.c (build_gdbtypes, gdbtypes_post_init): Likewise.
	* gdbarch.c, gdbarch.h: Regenerate.


Is this ok to commit?

Regards,
Markus

-- 
Markus Deuling
GNU Toolchain for Linux on Cell BE
deuling@de.ibm.com




[-- Attachment #2: diff-remove-TARGET_CHAR_SIGNED --]
[-- Type: text/plain, Size: 2993 bytes --]

diff -urN src/gdb/gdbarch.c dev/gdb/gdbarch.c
--- src/gdb/gdbarch.c	2007-05-15 05:41:29.000000000 +0200
+++ dev/gdb/gdbarch.c	2007-05-21 06:30:10.000000000 +0200
@@ -793,11 +793,6 @@
   fprintf_unfiltered (file,
                       "gdbarch_dump: cannot_store_register = <0x%lx>\n",
                       (long) current_gdbarch->cannot_store_register);
-#ifdef TARGET_CHAR_SIGNED
-  fprintf_unfiltered (file,
-                      "gdbarch_dump: TARGET_CHAR_SIGNED # %s\n",
-                      XSTRING (TARGET_CHAR_SIGNED));
-#endif
   fprintf_unfiltered (file,
                       "gdbarch_dump: char_signed = %s\n",
                       paddr_d (current_gdbarch->char_signed));
diff -urN src/gdb/gdbarch.h dev/gdb/gdbarch.h
--- src/gdb/gdbarch.h	2007-05-15 05:41:29.000000000 +0200
+++ dev/gdb/gdbarch.h	2007-05-21 06:30:00.000000000 +0200
@@ -245,12 +245,6 @@
 
 extern int gdbarch_char_signed (struct gdbarch *gdbarch);
 extern void set_gdbarch_char_signed (struct gdbarch *gdbarch, int char_signed);
-#if !defined (GDB_TM_FILE) && defined (TARGET_CHAR_SIGNED)
-#error "Non multi-arch definition of TARGET_CHAR_SIGNED"
-#endif
-#if !defined (TARGET_CHAR_SIGNED)
-#define TARGET_CHAR_SIGNED (gdbarch_char_signed (current_gdbarch))
-#endif
 
 #if defined (TARGET_READ_PC)
 /* Legacy for systems yet to multi-arch TARGET_READ_PC */
diff -urN src/gdb/gdbarch.sh dev/gdb/gdbarch.sh
--- src/gdb/gdbarch.sh	2007-05-15 05:41:29.000000000 +0200
+++ dev/gdb/gdbarch.sh	2007-05-21 06:29:54.000000000 +0200
@@ -417,7 +417,7 @@
 v:TARGET_BFD_VMA_BIT:int:bfd_vma_bit:::8 * sizeof (void*):TARGET_ARCHITECTURE->bits_per_address::0
 #
 # One if \`char' acts like \`signed char', zero if \`unsigned char'.
-v:TARGET_CHAR_SIGNED:int:char_signed:::1:-1:1
+v::int:char_signed:::1:-1:1
 #
 F:TARGET_READ_PC:CORE_ADDR:read_pc:ptid_t ptid:ptid
 f:TARGET_WRITE_PC:void:write_pc:CORE_ADDR val, ptid_t ptid:val, ptid:0:generic_target_write_pc::0
diff -urN src/gdb/gdbtypes.c dev/gdb/gdbtypes.c
--- src/gdb/gdbtypes.c	2007-05-18 05:34:56.000000000 +0200
+++ dev/gdb/gdbtypes.c	2007-05-21 06:32:42.000000000 +0200
@@ -3418,7 +3418,8 @@
   builtin_type_char =
     init_type (TYPE_CODE_INT, TARGET_CHAR_BIT / TARGET_CHAR_BIT,
 	       (TYPE_FLAG_NOSIGN
-                | (TARGET_CHAR_SIGNED ? 0 : TYPE_FLAG_UNSIGNED)),
+                | (gdbarch_char_signed (current_gdbarch) ?
+		   0 : TYPE_FLAG_UNSIGNED)),
 	       "char", (struct objfile *) NULL);
   builtin_type_true_char =
     init_type (TYPE_CODE_CHAR, TARGET_CHAR_BIT / TARGET_CHAR_BIT,
@@ -3612,7 +3613,8 @@
   builtin_type->builtin_char =
     init_type (TYPE_CODE_INT, TARGET_CHAR_BIT / TARGET_CHAR_BIT,
 	       (TYPE_FLAG_NOSIGN
-                | (TARGET_CHAR_SIGNED ? 0 : TYPE_FLAG_UNSIGNED)),
+                | (gdbarch_char_signed (current_gdbarch) ? 
+		   0 : TYPE_FLAG_UNSIGNED)),
 	       "char", (struct objfile *) NULL);
   builtin_type->builtin_true_char =
     init_type (TYPE_CODE_CHAR, TARGET_CHAR_BIT / TARGET_CHAR_BIT,



^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [rfc] [3/6] Remove macro TARGET_CHAR_SIGNED
  2007-05-29  7:22 [rfc] [3/6] Remove macro TARGET_CHAR_SIGNED Markus Deuling
@ 2007-05-30 21:15 ` Jim Blandy
  0 siblings, 0 replies; 2+ messages in thread
From: Jim Blandy @ 2007-05-30 21:15 UTC (permalink / raw)
  To: Markus Deuling; +Cc: GDB Patches, Ulrich Weigand

Markus Deuling <deuling@de.ibm.com> writes:
> ChangeLog:
>
> 	* gdbarch.sh (TARGET_CHAR_SIGNED): Replace by gdbarch_char_signed.
> 	* gdbtypes.c (build_gdbtypes, gdbtypes_post_init): Likewise.
> 	* gdbarch.c, gdbarch.h: Regenerate.
>
>
> Is this ok to commit?

This is also okay to commit, once the copyright assignment issues are
resolved.


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2007-05-30 21:15 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-05-29  7:22 [rfc] [3/6] Remove macro TARGET_CHAR_SIGNED Markus Deuling
2007-05-30 21:15 ` Jim Blandy

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox