Declare dwarf_always_disassemble in dwarf2read.h

Message ID 20190919043114.44137-1-cbiesinger@google.com
State New
Headers show
Series
  • Declare dwarf_always_disassemble in dwarf2read.h
Related show

Commit Message

Christian Biesinger via gdb-patches Sept. 19, 2019, 4:31 a.m.
[Simon, how's this? Compiles fine.]

And remove the declaration from dwarf2loc.c, for better typesafety.

gdb/ChangeLog:

2019-09-19  Christian Biesinger  <cbiesinger@google.com>

	* dwarf2loc.c: Remove extern declaration of dwarf_always_disassemble.
	* dwarf2read.h: Declare dwarf_always_disassemble.
---
 gdb/dwarf2loc.c  | 2 --
 gdb/dwarf2read.h | 2 ++
 2 files changed, 2 insertions(+), 2 deletions(-)

-- 
2.23.0.351.gc4317032e6-goog

Comments

Simon Marchi Sept. 19, 2019, 11:01 a.m. | #1
On 2019-09-19 12:31 a.m., Christian Biesinger via gdb-patches wrote:
> [Simon, how's this? Compiles fine.]

> 

> And remove the declaration from dwarf2loc.c, for better typesafety.


LGTM, thanks,

Simon
Christian Biesinger via gdb-patches Sept. 20, 2019, 12:15 a.m. | #2
On Thu, Sep 19, 2019 at 8:01 PM Simon Marchi <simark@simark.ca> wrote:
>

> On 2019-09-19 12:31 a.m., Christian Biesinger via gdb-patches wrote:

> > [Simon, how's this? Compiles fine.]

> >

> > And remove the declaration from dwarf2loc.c, for better typesafety.

>

> LGTM, thanks,


Thanks, pushed.

To ssh://sourceware.org/git/binutils-gdb.git
   956bafb0de0..e86f08d28f4  HEAD -> master

Christian

Patch

diff --git a/gdb/dwarf2loc.c b/gdb/dwarf2loc.c
index 29fccae5944..c8ba0290a02 100644
--- a/gdb/dwarf2loc.c
+++ b/gdb/dwarf2loc.c
@@ -46,8 +46,6 @@ 
 #include "gdbsupport/underlying.h"
 #include "gdbsupport/byte-vector.h"
 
-extern bool dwarf_always_disassemble;
-
 static struct value *dwarf2_evaluate_loc_desc_full (struct type *type,
 						    struct frame_info *frame,
 						    const gdb_byte *data,
diff --git a/gdb/dwarf2read.h b/gdb/dwarf2read.h
index 8939f97af53..e9b946247b0 100644
--- a/gdb/dwarf2read.h
+++ b/gdb/dwarf2read.h
@@ -33,6 +33,8 @@  extern struct cmd_list_element *show_dwarf_cmdlist;
 typedef struct dwarf2_per_cu_data *dwarf2_per_cu_ptr;
 DEF_VEC_P (dwarf2_per_cu_ptr);
 
+extern bool dwarf_always_disassemble;
+
 /* A descriptor for dwarf sections.
 
    S.ASECTION, SIZE are typically initialized when the objfile is first