[rfc] [1/6] Remove macro CALL_DUMMY_LOCATION

classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|

[rfc] [1/6] Remove macro CALL_DUMMY_LOCATION

Markus Deuling
Hello,

this patch removes CALL_DUMMY_LOCATION macro from gdbarch.sh.

ChangeLog:

        * gdbarch.sh (CALL_DUMMY_LOCATION): Replace by
        gdbarch_call_dummy_location.
        * infcall.c (call_function_by_hand): Likewise.
        * inferior.h: Change comment.
        * arch-utils.c: Change comment.
        * gdbarch.c, gdbarch.h: Regenerate.


Is this ok to commit?

Regards,
Markus

--
Markus Deuling
GNU Toolchain for Linux on Cell BE
[hidden email]





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-18 12:19:44.000000000 +0200
@@ -39,7 +39,7 @@
 #include "arch-utils.h"
 
 #include "gdbcmd.h"
-#include "inferior.h" /* enum CALL_DUMMY_LOCATION et.al. */
+#include "inferior.h" /* enum gdbarch_call_dummy_location et.al. */
 #include "symcat.h"
 
 #include "floatformat.h"
@@ -759,11 +759,6 @@
   fprintf_unfiltered (file,
                       "gdbarch_dump: byte_order = %s\n",
                       paddr_d (current_gdbarch->byte_order));
-#ifdef CALL_DUMMY_LOCATION
-  fprintf_unfiltered (file,
-                      "gdbarch_dump: CALL_DUMMY_LOCATION # %s\n",
-                      XSTRING (CALL_DUMMY_LOCATION));
-#endif
   fprintf_unfiltered (file,
                       "gdbarch_dump: call_dummy_location = %s\n",
                       paddr_d (current_gdbarch->call_dummy_location));
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-18 12:19:34.000000000 +0200
@@ -496,12 +496,6 @@
 
 extern int gdbarch_call_dummy_location (struct gdbarch *gdbarch);
 extern void set_gdbarch_call_dummy_location (struct gdbarch *gdbarch, int call_dummy_location);
-#if !defined (GDB_TM_FILE) && defined (CALL_DUMMY_LOCATION)
-#error "Non multi-arch definition of CALL_DUMMY_LOCATION"
-#endif
-#if !defined (CALL_DUMMY_LOCATION)
-#define CALL_DUMMY_LOCATION (gdbarch_call_dummy_location (current_gdbarch))
-#endif
 
 extern int gdbarch_push_dummy_code_p (struct gdbarch *gdbarch);
 
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-18 12:19:26.000000000 +0200
@@ -470,7 +470,7 @@
 M::CORE_ADDR:push_dummy_call:struct value *function, struct regcache *regcache, CORE_ADDR bp_addr, int nargs, struct value **args, CORE_ADDR sp, int struct_return, CORE_ADDR struct_addr:function, regcache, bp_addr, nargs, args, sp, struct_return, struct_addr
 # DEPRECATED_REGISTER_SIZE can be deleted.
 v:=:int:deprecated_register_size
-v:=:int:call_dummy_location::::AT_ENTRY_POINT::0
+v::int:call_dummy_location::::AT_ENTRY_POINT::0
 M::CORE_ADDR:push_dummy_code:CORE_ADDR sp, CORE_ADDR funaddr, int using_gcc, struct value **args, int nargs, struct type *value_type, CORE_ADDR *real_pc, CORE_ADDR *bp_addr:sp, funaddr, using_gcc, args, nargs, value_type, real_pc, bp_addr
 
 m::void:print_registers_info:struct ui_file *file, struct frame_info *frame, int regnum, int all:file, frame, regnum, all::default_print_registers_info::0
@@ -1179,7 +1179,7 @@
 #include "arch-utils.h"
 
 #include "gdbcmd.h"
-#include "inferior.h" /* enum CALL_DUMMY_LOCATION et.al. */
+#include "inferior.h" /* enum gdbarch_call_dummy_location et.al. */
 #include "symcat.h"
 
 #include "floatformat.h"
diff -urN src/gdb/infcall.c dev/gdb/infcall.c
--- src/gdb/infcall.c 2007-05-14 05:45:00.000000000 +0200
+++ dev/gdb/infcall.c 2007-05-18 12:18:10.000000000 +0200
@@ -454,7 +454,7 @@
   /* The actual breakpoint (at BP_ADDR) is inserted separatly so there
      is no need to write that out.  */
 
-  switch (CALL_DUMMY_LOCATION)
+  switch (gdbarch_call_dummy_location (current_gdbarch))
     {
     case ON_STACK:
       /* "dummy_addr" is here just to keep old targets happy.  New
diff -urN src/gdb/inferior.h dev/gdb/inferior.h
--- src/gdb/inferior.h 2007-05-14 05:45:00.000000000 +0200
+++ dev/gdb/inferior.h 2007-05-18 12:17:17.000000000 +0200
@@ -402,7 +402,7 @@
 
 extern int attach_flag;
 
-/* Possible values for CALL_DUMMY_LOCATION.  */
+/* Possible values for gdbarch_call_dummy_location.  */
 #define ON_STACK 1
 #define AT_ENTRY_POINT 4
 #define AT_SYMBOL 5



Reply | Threaded
Open this post in threaded view
|

Re: [rfc] [1/6] Remove macro CALL_DUMMY_LOCATION

Jim Blandy

Markus Deuling <[hidden email]> writes:

> this patch removes CALL_DUMMY_LOCATION macro from gdbarch.sh.
>
> ChangeLog:
>
> * gdbarch.sh (CALL_DUMMY_LOCATION): Replace by
> gdbarch_call_dummy_location.
> * infcall.c (call_function_by_hand): Likewise.
> * inferior.h: Change comment.
> * arch-utils.c: Change comment.
> * gdbarch.c, gdbarch.h: Regenerate.
>
>
> Is this ok to commit?

This looks good --- thank you!

But before you commit:

- Are your copyright papers in order?  I don't see your name appearing
  in the FSF's lists at all; Ulrich's does.

- It seems that others have been committing those patches of yours
  that have been approved so far; unless the answer to the first
  question bears on this somehow, you should have your own account on
  sourceware, and be added to the "Write After Approval" list.
Reply | Threaded
Open this post in threaded view
|

Re: [rfc] [1/6] Remove macro CALL_DUMMY_LOCATION

Daniel Jacobowitz-2
On Wed, May 30, 2007 at 02:12:31PM -0700, Jim Blandy wrote:
> But before you commit:
>
> - Are your copyright papers in order?  I don't see your name appearing
>   in the FSF's lists at all; Ulrich's does.
>
> - It seems that others have been committing those patches of yours
>   that have been approved so far; unless the answer to the first
>   question bears on this somehow, you should have your own account on
>   sourceware, and be added to the "Write After Approval" list.

Ulrich needs to commit the patch for him in order for all the magic
copyright voodoo to work out right.  We checked this with the FSF
assignment clerk a few months ago.

--
Daniel Jacobowitz
CodeSourcery
Reply | Threaded
Open this post in threaded view
|

Re: [rfc] [1/6] Remove macro CALL_DUMMY_LOCATION

Markus Deuling
In reply to this post by Jim Blandy
Hi Jim,

Jim Blandy wrote:

> Markus Deuling <[hidden email]> writes:
>> this patch removes CALL_DUMMY_LOCATION macro from gdbarch.sh.
>>
>> ChangeLog:
>>
>> * gdbarch.sh (CALL_DUMMY_LOCATION): Replace by
>> gdbarch_call_dummy_location.
>> * infcall.c (call_function_by_hand): Likewise.
>> * inferior.h: Change comment.
>> * arch-utils.c: Change comment.
>> * gdbarch.c, gdbarch.h: Regenerate.
>>
>>
>> Is this ok to commit?
>
> This looks good --- thank you!
thank you very much for your review.

I attached a new version of the patch where I deleted a unnecessary comment
instead of rewriting it.

-#include "inferior.h" /* enum CALL_DUMMY_LOCATION et.al. */
+#include "inferior.h"

If that's ok, could you please commit it Ulrich? Thanks in advance.

--
Markus Deuling
GNU Toolchain for Linux on Cell BE
[hidden email]




diff -urN src/gdb/gdbarch.c dev/gdb/gdbarch.c
--- src/gdb/gdbarch.c 2007-05-14 17:16:57.000000000 +0200
+++ dev/gdb/gdbarch.c 2007-05-30 17:15:46.000000000 +0200
@@ -39,7 +39,7 @@
 #include "arch-utils.h"
 
 #include "gdbcmd.h"
-#include "inferior.h" /* enum CALL_DUMMY_LOCATION et.al. */
+#include "inferior.h"
 #include "symcat.h"
 
 #include "floatformat.h"
@@ -759,11 +759,6 @@
   fprintf_unfiltered (file,
                       "gdbarch_dump: byte_order = %s\n",
                       paddr_d (current_gdbarch->byte_order));
-#ifdef CALL_DUMMY_LOCATION
-  fprintf_unfiltered (file,
-                      "gdbarch_dump: CALL_DUMMY_LOCATION # %s\n",
-                      XSTRING (CALL_DUMMY_LOCATION));
-#endif
   fprintf_unfiltered (file,
                       "gdbarch_dump: call_dummy_location = %s\n",
                       paddr_d (current_gdbarch->call_dummy_location));
diff -urN src/gdb/gdbarch.h dev/gdb/gdbarch.h
--- src/gdb/gdbarch.h 2007-05-14 17:16:57.000000000 +0200
+++ dev/gdb/gdbarch.h 2007-05-30 17:15:35.000000000 +0200
@@ -496,12 +496,6 @@
 
 extern int gdbarch_call_dummy_location (struct gdbarch *gdbarch);
 extern void set_gdbarch_call_dummy_location (struct gdbarch *gdbarch, int call_dummy_location);
-#if !defined (GDB_TM_FILE) && defined (CALL_DUMMY_LOCATION)
-#error "Non multi-arch definition of CALL_DUMMY_LOCATION"
-#endif
-#if !defined (CALL_DUMMY_LOCATION)
-#define CALL_DUMMY_LOCATION (gdbarch_call_dummy_location (current_gdbarch))
-#endif
 
 extern int gdbarch_push_dummy_code_p (struct gdbarch *gdbarch);
 
diff -urN src/gdb/gdbarch.sh dev/gdb/gdbarch.sh
--- src/gdb/gdbarch.sh 2007-05-14 17:16:57.000000000 +0200
+++ dev/gdb/gdbarch.sh 2007-05-30 17:15:29.000000000 +0200
@@ -470,7 +470,7 @@
 M::CORE_ADDR:push_dummy_call:struct value *function, struct regcache *regcache, CORE_ADDR bp_addr, int nargs, struct value **args, CORE_ADDR sp, int struct_return, CORE_ADDR struct_addr:function, regcache, bp_addr, nargs, args, sp, struct_return, struct_addr
 # DEPRECATED_REGISTER_SIZE can be deleted.
 v:=:int:deprecated_register_size
-v:=:int:call_dummy_location::::AT_ENTRY_POINT::0
+v::int:call_dummy_location::::AT_ENTRY_POINT::0
 M::CORE_ADDR:push_dummy_code:CORE_ADDR sp, CORE_ADDR funaddr, int using_gcc, struct value **args, int nargs, struct type *value_type, CORE_ADDR *real_pc, CORE_ADDR *bp_addr:sp, funaddr, using_gcc, args, nargs, value_type, real_pc, bp_addr
 
 m::void:print_registers_info:struct ui_file *file, struct frame_info *frame, int regnum, int all:file, frame, regnum, all::default_print_registers_info::0
@@ -1179,7 +1179,7 @@
 #include "arch-utils.h"
 
 #include "gdbcmd.h"
-#include "inferior.h" /* enum CALL_DUMMY_LOCATION et.al. */
+#include "inferior.h"
 #include "symcat.h"
 
 #include "floatformat.h"
diff -urN src/gdb/infcall.c dev/gdb/infcall.c
--- src/gdb/infcall.c 2007-05-13 14:27:29.000000000 +0200
+++ dev/gdb/infcall.c 2007-05-30 17:14:27.000000000 +0200
@@ -454,7 +454,7 @@
   /* The actual breakpoint (at BP_ADDR) is inserted separatly so there
      is no need to write that out.  */
 
-  switch (CALL_DUMMY_LOCATION)
+  switch (gdbarch_call_dummy_location (current_gdbarch))
     {
     case ON_STACK:
       /* "dummy_addr" is here just to keep old targets happy.  New
diff -urN src/gdb/inferior.h dev/gdb/inferior.h
--- src/gdb/inferior.h 2007-05-13 14:27:30.000000000 +0200
+++ dev/gdb/inferior.h 2007-05-30 17:14:27.000000000 +0200
@@ -402,7 +402,7 @@
 
 extern int attach_flag;
 
-/* Possible values for CALL_DUMMY_LOCATION.  */
+/* Possible values for gdbarch_call_dummy_location.  */
 #define ON_STACK 1
 #define AT_ENTRY_POINT 4
 #define AT_SYMBOL 5


Reply | Threaded
Open this post in threaded view
|

Re: [rfc] [1/6] Remove macro CALL_DUMMY_LOCATION

Jim Blandy
In reply to this post by Daniel Jacobowitz-2

Daniel Jacobowitz <[hidden email]> writes:

> On Wed, May 30, 2007 at 02:12:31PM -0700, Jim Blandy wrote:
>> But before you commit:
>>
>> - Are your copyright papers in order?  I don't see your name appearing
>>   in the FSF's lists at all; Ulrich's does.
>>
>> - It seems that others have been committing those patches of yours
>>   that have been approved so far; unless the answer to the first
>>   question bears on this somehow, you should have your own account on
>>   sourceware, and be added to the "Write After Approval" list.
>
> Ulrich needs to commit the patch for him in order for all the magic
> copyright voodoo to work out right.  We checked this with the FSF
> assignment clerk a few months ago.

Sheesh.  (I did search the archives, but apparently not well enough.)
Could we put Markus on the Write After Approval list, with a note
about this?  Say:

*** MAINTAINERS 30 May 2007 14:56:46 -0700 1.370
--- MAINTAINERS 31 May 2007 14:42:39 -0700
***************
*** 473,478 ****
--- 473,481 ----
  DJ Delorie [hidden email]
  Philippe De Muyter [hidden email]
  Dhananjay Deshpande [hidden email]
+ Markus Deuling                                  [hidden email]
+        The legal arrangement between the FSF and IBM requires Ulrich
+        Weigand to commit Markus's patches.
  Klee Dienes [hidden email]
  Gabriel Dos Reis                                [hidden email]
  Richard Earnshaw [hidden email]
Reply | Threaded
Open this post in threaded view
|

Re: [rfc] [1/6] Remove macro CALL_DUMMY_LOCATION

Jim Blandy
In reply to this post by Markus Deuling

Markus Deuling <[hidden email]> writes:
> I attached a new version of the patch where I deleted a unnecessary comment
> instead of rewriting it.
>
> -#include "inferior.h" /* enum CALL_DUMMY_LOCATION et.al. */
> +#include "inferior.h"
>
> If that's ok, could you please commit it Ulrich? Thanks in advance.

That comment was weird before the change, and weird after the change.
This is fine with me.
Reply | Threaded
Open this post in threaded view
|

Re: [rfc] [1/6] Remove macro CALL_DUMMY_LOCATION

Daniel Jacobowitz-2
In reply to this post by Jim Blandy
On Thu, May 31, 2007 at 02:43:08PM -0700, Jim Blandy wrote:
> Sheesh.  (I did search the archives, but apparently not well enough.)
> Could we put Markus on the Write After Approval list, with a note
> about this?  Say:

It should be about IBM in general, not about Markus; I would prefer
not to list people without write access, and it's not specific to him.

--
Daniel Jacobowitz
CodeSourcery
Reply | Threaded
Open this post in threaded view
|

Re: [rfc] [1/6] Remove macro CALL_DUMMY_LOCATION

Ulrich Weigand
Daniel Jacobowitz wrote:
> On Thu, May 31, 2007 at 02:43:08PM -0700, Jim Blandy wrote:
> > Sheesh.  (I did search the archives, but apparently not well enough.)
> > Could we put Markus on the Write After Approval list, with a note
> > about this?  Say:
>
> It should be about IBM in general, not about Markus; I would prefer
> not to list people without write access, and it's not specific to him.

I agree.  This is not really a matter of GDB repository write access
or maintainership responsibility; what this is about is really the
conditions of IBM's copyright assignment agreement with the FSF.

If any clarification in that area is required, it should probably go into
the FSF's copyright list, not the GDB MAINTAINERS file ...

Bye,
Ulrich

--
  Dr. Ulrich Weigand
  GNU Toolchain for Linux on System z and Cell BE
  [hidden email]