gdb/
authorJan Kratochvil <jan.kratochvil@redhat.com>
Wed, 11 Aug 2010 13:24:32 +0000 (13:24 +0000)
committerJan Kratochvil <jan.kratochvil@redhat.com>
Wed, 11 Aug 2010 13:24:32 +0000 (13:24 +0000)
Code cleanup.
* dummy-frame.c (dummy_frame_unwinder): Remove its static qualifier.
Rename to dummy_frame_unwind.
(dummy_frame_unwind): Remove.
* dummy-frame.h (dummy_frame_unwind): Reference directly the struct.
* frame-unwind.c (frame_unwind_init): Use address of
dummy_frame_unwind and inline_frame_unwind.
* frame.c (create_sentinel_frame): Use address of
sentinel_frame_unwind.
* inline-frame.c (inline_frame_unwinder): Rename to
inline_frame_unwind.
(inline_frame_unwind): Remove.
* inline-frame.h (inline_frame_unwind): Reference directly the struct.
* sentinel-frame.c (sentinel_frame_unwinder): Rename to
sentinel_frame_unwind.
(sentinel_frame_unwind): Remove.
* sentinel-frame.h (sentinel_frame_unwind): Reference directly the
struct.

gdb/ChangeLog
gdb/dummy-frame.c
gdb/dummy-frame.h
gdb/frame-unwind.c
gdb/frame.c
gdb/inline-frame.c
gdb/inline-frame.h
gdb/sentinel-frame.c
gdb/sentinel-frame.h

index 84b1d665043088c3df6cdc8cb5188f5e4023e8a1..72e614a27cee261c802f1d5018582b3682d74b4b 100644 (file)
@@ -1,3 +1,24 @@
+2010-08-11  Jan Kratochvil  <jan.kratochvil@redhat.com>
+
+       Code cleanup.
+       * dummy-frame.c (dummy_frame_unwinder): Remove its static qualifier.
+       Rename to dummy_frame_unwind.
+       (dummy_frame_unwind): Remove.
+       * dummy-frame.h (dummy_frame_unwind): Reference directly the struct.
+       * frame-unwind.c (frame_unwind_init): Use address of
+       dummy_frame_unwind and inline_frame_unwind.
+       * frame.c (create_sentinel_frame): Use address of
+       sentinel_frame_unwind.
+       * inline-frame.c (inline_frame_unwinder): Rename to
+       inline_frame_unwind.
+       (inline_frame_unwind): Remove.
+       * inline-frame.h (inline_frame_unwind): Reference directly the struct.
+       * sentinel-frame.c (sentinel_frame_unwinder): Rename to
+       sentinel_frame_unwind.
+       (sentinel_frame_unwind): Remove.
+       * sentinel-frame.h (sentinel_frame_unwind): Reference directly the
+       struct.
+
 2010-08-11  Jan Kratochvil  <jan.kratochvil@redhat.com>
 
        Code cleanup.
index d6a7241369fed3a6e654ec32a1518c9997445e80..66f4c8ca55a55a7469cfaed166b29bd591f2da08 100644 (file)
@@ -274,7 +274,7 @@ dummy_frame_this_id (struct frame_info *this_frame,
   (*this_id) = cache->this_id;
 }
 
-static const struct frame_unwind dummy_frame_unwinder =
+const struct frame_unwind dummy_frame_unwind =
 {
   DUMMY_FRAME,
   dummy_frame_this_id,
@@ -283,10 +283,6 @@ static const struct frame_unwind dummy_frame_unwinder =
   dummy_frame_sniffer,
 };
 
-const struct frame_unwind *const dummy_frame_unwind = {
-  &dummy_frame_unwinder
-};
-
 static void
 fprint_dummy_frames (struct ui_file *file)
 {
index 80f36f80210fc45c5b0bfc34f4057a199c56bb75..c97301cd7b8a85dd696f49540d4833767bdbbd7d 100644 (file)
@@ -56,6 +56,6 @@ extern void dummy_frame_pop (struct frame_id dummy_id);
 /* If the PC falls in a dummy frame, return a dummy frame
    unwinder.  */
 
-extern const struct frame_unwind *const dummy_frame_unwind;
+extern const struct frame_unwind dummy_frame_unwind;
 
 #endif /* !defined (DUMMY_FRAME_H)  */
index bbb3e9074ce7f594d9df9d7ef54f8a7ddc216fca..8df7adf7148e2f809afc6254bf570f1f22785008 100644 (file)
@@ -53,9 +53,9 @@ frame_unwind_init (struct obstack *obstack)
   /* Start the table out with a few default sniffers.  OSABI code
      can't override this.  */
   table->list = OBSTACK_ZALLOC (obstack, struct frame_unwind_table_entry);
-  table->list->unwinder = dummy_frame_unwind;
+  table->list->unwinder = &dummy_frame_unwind;
   table->list->next = OBSTACK_ZALLOC (obstack, struct frame_unwind_table_entry);
-  table->list->next->unwinder = inline_frame_unwind;
+  table->list->next->unwinder = &inline_frame_unwind;
   /* The insertion point for OSABI sniffers.  */
   table->osabi_head = &table->list->next->next;
   return table;
index 64c644411eaa27bbbe8ad96ae83f3c49925e3c15..53d2fba6dafbc0fecb817a57105d80b1fabe63d3 100644 (file)
@@ -1100,7 +1100,7 @@ create_sentinel_frame (struct program_space *pspace, struct regcache *regcache)
      information, such as the frame's thread will be added.  */
   frame->prologue_cache = sentinel_frame_cache (regcache);
   /* For the moment there is only one sentinel frame implementation.  */
-  frame->unwind = sentinel_frame_unwind;
+  frame->unwind = &sentinel_frame_unwind;
   /* Link this frame back to itself.  The frame is self referential
      (the unwound PC is the same as the pc), so make it so.  */
   frame->next = frame;
index 706bcd962ca29857723f0ec4037eac338b3425c4..1b19b5f397ec2932583db0bd5ab3a97cb1417e3e 100644 (file)
@@ -256,7 +256,7 @@ inline_frame_sniffer (const struct frame_unwind *self,
   return 1;
 }
 
-const struct frame_unwind inline_frame_unwinder = {
+const struct frame_unwind inline_frame_unwind = {
   INLINE_FRAME,
   inline_frame_this_id,
   inline_frame_prev_register,
@@ -264,8 +264,6 @@ const struct frame_unwind inline_frame_unwinder = {
   inline_frame_sniffer
 };
 
-const struct frame_unwind *const inline_frame_unwind = &inline_frame_unwinder;
-
 /* Return non-zero if BLOCK, an inlined function block containing PC,
    has a group of contiguous instructions starting at PC (but not
    before it).  */
index c48e8d7bf2234e97cd576667c988847edd3e09ca..97e829641d59aa6e2275a26c1f1af8933a8d8b87 100644 (file)
@@ -25,7 +25,7 @@ struct frame_unwind;
 
 /* The inline frame unwinder.  */
 
-extern const struct frame_unwind *const inline_frame_unwind;
+extern const struct frame_unwind inline_frame_unwind;
 
 /* Skip all inlined functions whose call sites are at the current PC.
    Frames for the hidden functions will not appear in the backtrace until the
index 8c11d7bd10a21982cbc8cb1996b1e78e2fb68b89..ddb471dd5ebf44844021450d40e490c23ddae359 100644 (file)
@@ -86,7 +86,7 @@ sentinel_frame_prev_arch (struct frame_info *this_frame,
   return get_regcache_arch (cache->regcache);
 }
 
-const struct frame_unwind sentinel_frame_unwinder =
+const struct frame_unwind sentinel_frame_unwind =
 {
   SENTINEL_FRAME,
   sentinel_frame_this_id,
@@ -96,5 +96,3 @@ const struct frame_unwind sentinel_frame_unwinder =
   NULL,
   sentinel_frame_prev_arch,
 };
-
-const struct frame_unwind *const sentinel_frame_unwind = &sentinel_frame_unwinder;
index 0c9f576ef6216cc5e0f5bd3e9109520283dfd1be..3346640f4054c4426193353ca24b6e6af97be376 100644 (file)
@@ -34,6 +34,6 @@ extern void *sentinel_frame_cache (struct regcache *regcache);
 
 /* At present there is only one type of sentinel frame.  */
 
-extern const struct frame_unwind *const sentinel_frame_unwind;
+extern const struct frame_unwind sentinel_frame_unwind;
 
 #endif /* !defined (SENTINEL_FRAME_H)  */
This page took 0.032067 seconds and 4 git commands to generate.