Don't declare read_unsigned_leb128 in defs.h
authorTom Tromey <tromey@adacore.com>
Wed, 1 May 2019 18:26:34 +0000 (12:26 -0600)
committerTom Tromey <tromey@adacore.com>
Wed, 8 May 2019 16:38:02 +0000 (10:38 -0600)
I noticed that read_unsigned_leb128 is declared in defs.h.  There's no
reason this should be here, so this patch moves it to dwarf2read.h.

gdb/ChangeLog
2019-05-08  Tom Tromey  <tromey@adacore.com>

* dwarf2loc.c: Include dwarf2read.h.
* defs.h (read_unsigned_leb128): Don't declare.
* dwarf2read.h (read_unsigned_leb128): Declare.

gdb/ChangeLog
gdb/defs.h
gdb/dwarf2loc.c
gdb/dwarf2read.h

index ec2424a5bc861b13034f7979c47fdcfe7651236f..0293096ee22b6167f1804b74484a2da6bea594a7 100644 (file)
@@ -1,3 +1,9 @@
+2019-05-08  Tom Tromey  <tromey@adacore.com>
+
+       * dwarf2loc.c: Include dwarf2read.h.
+       * defs.h (read_unsigned_leb128): Don't declare.
+       * dwarf2read.h (read_unsigned_leb128): Declare.
+
 2019-05-08  Tom Tromey  <tromey@adacore.com>
 
        * utils.c (fputs_maybe_filtered): Call can_emit_style_escape as a
index a44e186907dadcf26860f040ab2f8daa1e2b5537..673a200d5d0e1f40232fb3c6346f516e848cf102 100644 (file)
@@ -582,10 +582,6 @@ extern void copy_integer_to_size (gdb_byte *dest, int dest_size,
 
 extern int watchdog;
 
-/* From dwarf2read.c */
-
-ULONGEST read_unsigned_leb128 (bfd *, const gdb_byte *, unsigned int *);
-
 /* Hooks for alternate command interfaces.  */
 
 /* * The name of the interpreter if specified on the command line.  */
index c5145af7c66006b5022f13a043c65dc41b3735bd..37cda40ecf35e8f9257b0e8899ed67477a215fbf 100644 (file)
@@ -36,6 +36,7 @@
 #include "dwarf2.h"
 #include "dwarf2expr.h"
 #include "dwarf2loc.h"
+#include "dwarf2read.h"
 #include "dwarf2-frame.h"
 #include "compile/compile.h"
 #include "common/selftest.h"
index 34c66167b5b5ce7e7f3e189c6790df1aeac6181f..82bf6397ea1f79aa645b50c3154182abbd28fab1 100644 (file)
@@ -403,4 +403,6 @@ struct signatured_type
 typedef struct signatured_type *sig_type_ptr;
 DEF_VEC_P (sig_type_ptr);
 
+ULONGEST read_unsigned_leb128 (bfd *, const gdb_byte *, unsigned int *);
+
 #endif /* DWARF2READ_H */