[PATCH] Fixups in procfs.c

msnyder@cygnus.com msnyder@cygnus.com
Wed Apr 26 16:38:00 GMT 2000


I will check in the following minor fix-ups in procfs:

2000-04-26  Michael Snyder  <msnyder@seadog.cygnus.com>

        * procfs.c (comments): Eliminate "???" in comments, which GCC
        wants to interpret as a trigraph.  (fill_gregset, supply_gregset,
        fill_fpregset, supply_fpregset): declare.  
	(procfs_wait): Sysargs is a long, change printf format to match.
        (test-mapping, mapping_test, test_mapping_cmd) Remove (test only).

Index: procfs.c
===================================================================
RCS file: /cvs/src/src/gdb/procfs.c,v
retrieving revision 1.5
diff -c -r1.5 procfs.c
*** procfs.c	2000/04/07 04:33:21	1.5
--- procfs.c	2000/04/26 23:37:20
***************
*** 590,596 ****
   * Function: create_procinfo
   *
   * Allocate a data structure and link it into the procinfo list.
!  * (First tries to find a pre-existing one (FIXME: why???)
   *
   * Return: pointer to new procinfo struct.
   */
--- 590,596 ----
   * Function: create_procinfo
   *
   * Allocate a data structure and link it into the procinfo list.
!  * (First tries to find a pre-existing one (FIXME: why?)
   *
   * Return: pointer to new procinfo struct.
   */
***************
*** 3483,3488 ****
--- 3483,3495 ----
   * is resumed.
   */
  
+ /* These could go in a header file, but the many and various
+    definitions of gregset_t would make it tricky...  MVS */
+ extern void fill_gregset (gdb_gregset_t *, int);
+ extern void fill_fpregset (gdb_fpregset_t *, int);
+ extern void supply_gregset (gdb_gregset_t *);
+ extern void supply_fpregset (gdb_fpregset_t *);
+ 
  static void
  procfs_fetch_registers (regno)
       int regno;
***************
*** 3750,3756 ****
  			 return a "success" exit code.  Bogus: what if
  			 it returns something else?  */
  		      wstat = 0;
! 		      retval = inferior_pid;  /* ??? */
  		    }
  		  else
  		    {
--- 3757,3763 ----
  			 return a "success" exit code.  Bogus: what if
  			 it returns something else?  */
  		      wstat = 0;
! 		      retval = inferior_pid;  /* ? ? ? */
  		    }
  		  else
  		    {
***************
*** 3781,3787 ****
  		      {
  			printf_filtered ("%ld syscall arguments:\n", nsysargs);
  			for (i = 0; i < nsysargs; i++)
! 			  printf_filtered ("#%ld: 0x%08x\n", 
  					   i, sysargs[i]);
  		      }
  
--- 3788,3794 ----
  		      {
  			printf_filtered ("%ld syscall arguments:\n", nsysargs);
  			for (i = 0; i < nsysargs; i++)
! 			  printf_filtered ("#%ld: 0x%08lx\n", 
  					   i, sysargs[i]);
  		      }
  
***************
*** 3895,3901 ****
  		      {
  			printf_filtered ("%ld syscall arguments:\n", nsysargs);
  			for (i = 0; i < nsysargs; i++)
! 			  printf_filtered ("#%ld: 0x%08x\n", 
  					   i, sysargs[i]);
  		      }
  		  }
--- 3902,3908 ----
  		      {
  			printf_filtered ("%ld syscall arguments:\n", nsysargs);
  			for (i = 0; i < nsysargs; i++)
! 			  printf_filtered ("#%ld: 0x%08lx\n", 
  					   i, sysargs[i]);
  		      }
  		  }
***************
*** 5192,5218 ****
  }
  
  
- int
- mapping_test (fd, core_addr)
-      int fd;
-      CORE_ADDR core_addr;
- {
-   printf ("File descriptor %d, base address 0x%08x\n", fd, core_addr);
-   if (fd > 0)
-     close (fd);
-   return 0;
- }
- 
- void
- test_mapping_cmd (args, from_tty)
-      char *args;
-      int from_tty;
- {
-   int ret;
-   ret = proc_iterate_over_mappings (mapping_test);
-   printf ("iterate_over_mappings returned %d.\n", ret);
- }
- 
  void
  _initialize_procfs ()
  {
--- 5199,5204 ----
***************
*** 5229,5237 ****
  	   "Cancel a trace of entries into the syscall.");
    add_com ("proc-untrace-exit", no_class, proc_untrace_sysexit_cmd, 
  	   "Cancel a trace of exits from the syscall.");
- 
-   add_com ("test-mapping", no_class, test_mapping_cmd, 
- 	   "test iterate-over-mappings");
  }
  
  /* =================== END, GDB  "MODULE" =================== */
--- 5215,5220 ----


More information about the Gdb-patches mailing list