This is the mail archive of the gdb-patches@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[COMMIT] Some small hppa-hpux-tdep.c tweaks


Just a few small tweaks that make the code a bit more readable.

Committed as obvious.

Mark


Index: ChangeLog
from  Mark Kettenis  <kettenis@gnu.org>

	* hppa-hpux-tdep.c (child_enable_exception_callback): Use XMALLOC.
	(hppa_hpux_sigtramp_frame_unwind_cache): Use ARRAY_SIZE.
	(hppa_hpux_init_abi): Reformat long line.

Index: hppa-hpux-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/hppa-hpux-tdep.c,v
retrieving revision 1.30
diff -u -p -r1.30 hppa-hpux-tdep.c
--- hppa-hpux-tdep.c 10 Dec 2004 09:42:08 -0000 1.30
+++ hppa-hpux-tdep.c 10 Dec 2004 10:43:35 -0000
@@ -999,11 +999,9 @@ child_enable_exception_callback (enum ex
       error ("Request to enable unknown or unsupported exception event.");
     }
 
-  /* Copy break address into new sal struct, malloc'ing if needed. */
+  /* Copy break address into new sal struct, malloc'ing if needed.  */
   if (!break_callback_sal)
-    {
-      break_callback_sal = (struct symtab_and_line *) xmalloc (sizeof (struct symtab_and_line));
-    }
+    break_callback_sal = XMALLOC (struct symtab_and_line);
   init_sal (break_callback_sal);
   break_callback_sal->symtab = NULL;
   break_callback_sal->pc = eh_break_addr;
@@ -1171,9 +1169,7 @@ hppa_hpux_sigtramp_frame_unwind_cache (s
       off += incr;
     }
 
-  for (i = 0; 
-       i < sizeof(hppa_hpux_tramp_reg) / sizeof(hppa_hpux_tramp_reg[0]);
-       i++)
+  for (i = 0; ARRAY_SIZE (hppa_hpux_tramp_reg); i++)
     {
       if (hppa_hpux_tramp_reg[i] > 0)
         info->saved_regs[hppa_hpux_tramp_reg[i]].addr = off + szoff;
@@ -1666,8 +1662,8 @@ hppa_hpux_init_abi (struct gdbarch_info 
 
   tdep->unwind_adjust_stub = hppa_hpux_unwind_adjust_stub;
 
-  set_gdbarch_in_solib_return_trampoline (gdbarch,
-					  hppa_hpux_in_solib_return_trampoline);
+  set_gdbarch_in_solib_return_trampoline
+    (gdbarch, hppa_hpux_in_solib_return_trampoline);
   set_gdbarch_skip_trampoline_code (gdbarch, hppa_hpux_skip_trampoline_code);
 
   set_gdbarch_push_dummy_code (gdbarch, hppa_hpux_push_dummy_code);


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]