[PATCH] Was: [FYI] include/dis-asm.h: read_memory_func signature changed

Andrew Cagney ac131313@cygnus.com
Tue Feb 22 18:39:00 GMT 2000


Andrew Cagney wrote:
> 
> BTW,
> 
> The signature:
> 
> 1.1          (rth      03-May-99):   int (*read_memory_func)
> 1.10         (amodra   21-Feb-00):     PARAMS ((bfd_vma memaddr,
> bfd_byte *myaddr, unsigned int length,
> 1.1          (rth      03-May-99):           struct disassemble_info
> *info));
> 
> just changed (that was just ``int length''). This affects
> gdb/gdbarch.[hc] and probably a few other places.
> 
> (for binutils) If the include directory is being changed a heads-up on
> the gdb side (gdb-patches@sourceware.cygnus.com) wouldn't hurt.

FYI,

The attatched patch fixes the GDB side.

	Andrew
Index: gdb/ChangeLog
Wed Feb 23 12:58:46 2000  Andrew Cagney  <cagney@b1.cygnus.com>

	* gdbarch.sh (dis_asm_read_memory): Change LEN to unsigned long.
  	Match ../include/dis-asm.h change.
	* gdbarch.h: Regenerate.
	* corefile.c (dis_asm_read_memory): Update.

Index: gdb/gdbtk/generic/ChangeLog-gdbtk
Wed Feb 23 13:01:36 2000  Andrew Cagney  <cagney@b1.cygnus.com>

	* gdbtk-cmds.c (gdbtk_dis_asm_read_memory): Change LEN to unsigned
 	long.  Match ../include/dis-asm.h change.

Index: gdb/mi/ChangeLog-mi
Wed Feb 23 13:31:16 2000  Andrew Cagney  <cagney@b1.cygnus.com>

	* mi-cmd-disas.c (gdb_dis_asm_read_memory): Change LEN to unsigned
 	long.  Match ../include/dis-asm.h change.

Index: gdb/corefile.c
===================================================================
RCS file: /cvs/src/src/gdb/corefile.c,v
retrieving revision 1.1.1.9
diff -p -r1.1.1.9 corefile.c
*** corefile.c	2000/02/02 00:21:05	1.1.1.9
--- corefile.c	2000/02/23 02:35:08
*************** int
*** 289,295 ****
  dis_asm_read_memory (memaddr, myaddr, len, info)
       bfd_vma memaddr;
       bfd_byte *myaddr;
!      int len;
       disassemble_info *info;
  {
    return target_read_memory (memaddr, (char *) myaddr, len);
--- 289,295 ----
  dis_asm_read_memory (memaddr, myaddr, len, info)
       bfd_vma memaddr;
       bfd_byte *myaddr;
!      unsigned int len;
       disassemble_info *info;
  {
    return target_read_memory (memaddr, (char *) myaddr, len);
Index: gdb/gdbarch.h
===================================================================
RCS file: /cvs/src/src/gdb/gdbarch.h,v
retrieving revision 1.2
diff -p -r1.2 gdbarch.h
*** gdbarch.h	2000/02/22 19:17:27	1.2
--- gdbarch.h	2000/02/23 02:35:15
*************** extern int (*target_architecture_hook) (
*** 1034,1040 ****
  #include "dis-asm.h"		/* Get defs for disassemble_info */
  
  extern int dis_asm_read_memory (bfd_vma memaddr, bfd_byte *myaddr,
! 				int len, disassemble_info *info);
  
  extern void dis_asm_memory_error (int status, bfd_vma memaddr,
  				  disassemble_info *info);
--- 1034,1040 ----
  #include "dis-asm.h"		/* Get defs for disassemble_info */
  
  extern int dis_asm_read_memory (bfd_vma memaddr, bfd_byte *myaddr,
! 				unsigned int len, disassemble_info *info);
  
  extern void dis_asm_memory_error (int status, bfd_vma memaddr,
  				  disassemble_info *info);
Index: gdb/gdbarch.sh
===================================================================
RCS file: /cvs/src/src/gdb/gdbarch.sh,v
retrieving revision 1.3
diff -p -r1.3 gdbarch.sh
*** gdbarch.sh	2000/02/22 19:19:12	1.3
--- gdbarch.sh	2000/02/23 02:35:15
*************** extern int (*target_architecture_hook) (
*** 637,643 ****
  #include "dis-asm.h"		/* Get defs for disassemble_info */
  
  extern int dis_asm_read_memory (bfd_vma memaddr, bfd_byte *myaddr,
! 				int len, disassemble_info *info);
  
  extern void dis_asm_memory_error (int status, bfd_vma memaddr,
  				  disassemble_info *info);
--- 637,643 ----
  #include "dis-asm.h"		/* Get defs for disassemble_info */
  
  extern int dis_asm_read_memory (bfd_vma memaddr, bfd_byte *myaddr,
! 				unsigned int len, disassemble_info *info);
  
  extern void dis_asm_memory_error (int status, bfd_vma memaddr,
  				  disassemble_info *info);
Index: gdb/gdbtk/generic/gdbtk-cmds.c
===================================================================
RCS file: /cvs/src/src/gdb/gdbtk/generic/gdbtk-cmds.c,v
retrieving revision 1.1.1.1
diff -p -r1.1.1.1 gdbtk-cmds.c
*** gdbtk-cmds.c	2000/02/07 00:19:42	1.1.1.1
--- gdbtk-cmds.c	2000/02/23 02:35:32
*************** static int gdb_tracepoint_exists_command
*** 268,274 ****
  						  Tcl_Obj * CONST objv[]));
  static int gdb_get_tracepoint_info PARAMS ((ClientData, Tcl_Interp *, int,
  					    Tcl_Obj * CONST objv[]));
! static int gdbtk_dis_asm_read_memory PARAMS ((bfd_vma, bfd_byte *, int,
  					      disassemble_info *));
  static void gdbtk_load_source PARAMS ((ClientData clientData,
  				       struct symtab *symtab,
--- 268,274 ----
  						  Tcl_Obj * CONST objv[]));
  static int gdb_get_tracepoint_info PARAMS ((ClientData, Tcl_Interp *, int,
  					    Tcl_Obj * CONST objv[]));
! static int gdbtk_dis_asm_read_memory PARAMS ((bfd_vma, bfd_byte *, unsigned int,
  					      disassemble_info *));
  static void gdbtk_load_source PARAMS ((ClientData clientData,
  				       struct symtab *symtab,
*************** static int
*** 3030,3036 ****
  gdbtk_dis_asm_read_memory (memaddr, myaddr, len, info)
       bfd_vma memaddr;
       bfd_byte *myaddr;
!      int len;
       disassemble_info *info;
  {
    extern struct target_ops exec_ops;
--- 3030,3036 ----
  gdbtk_dis_asm_read_memory (memaddr, myaddr, len, info)
       bfd_vma memaddr;
       bfd_byte *myaddr;
!      unsigned int len;
       disassemble_info *info;
  {
    extern struct target_ops exec_ops;
Index: gdb/mi/mi-cmd-disas.c
===================================================================
RCS file: /cvs/src/src/gdb/mi/mi-cmd-disas.c,v
retrieving revision 1.1
diff -p -r1.1 mi-cmd-disas.c
*** mi-cmd-disas.c	2000/02/23 00:25:43	1.1
--- mi-cmd-disas.c	2000/02/23 02:35:38
***************
*** 26,32 ****
  #include "mi-getopt.h"
  #include "ui-out.h"
  
! static int gdb_dis_asm_read_memory (bfd_vma memaddr, bfd_byte * myaddr, int len,
  				    disassemble_info * info);
  static int compare_lines (const PTR mle1p, const PTR mle2p);
  
--- 26,32 ----
  #include "mi-getopt.h"
  #include "ui-out.h"
  
! static int gdb_dis_asm_read_memory (bfd_vma memaddr, bfd_byte * myaddr, unsigned int len,
  				    disassemble_info * info);
  static int compare_lines (const PTR mle1p, const PTR mle2p);
  
*************** int gdb_disassemble_from_exec = -1;
*** 52,58 ****
  /* This is the memory_read_func for gdb_disassemble when we are
     disassembling from the exec file. */
  static int
! gdb_dis_asm_read_memory (bfd_vma memaddr, bfd_byte * myaddr, int len, disassemble_info * info)
  {
    extern struct target_ops exec_ops;
    int res;
--- 52,59 ----
  /* This is the memory_read_func for gdb_disassemble when we are
     disassembling from the exec file. */
  static int
! gdb_dis_asm_read_memory (bfd_vma memaddr, bfd_byte * myaddr,
! 			 unsigned int len, disassemble_info * info)
  {
    extern struct target_ops exec_ops;
    int res;


More information about the Binutils mailing list