This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: Introduce support for location views
- From: Alexandre Oliva <aoliva at redhat dot com>
- To: Nick Clifton <nickc at redhat dot com>
- Cc: binutils at sourceware dot org
- Date: Thu, 13 Jul 2017 09:51:09 -0300
- Subject: Re: Introduce support for location views
- Authentication-results: sourceware.org; auth=none
- Authentication-results: ext-mx05.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com
- Authentication-results: ext-mx05.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=aoliva at redhat dot com
- Dkim-filter: OpenDKIM Filter v2.11.0 mx1.redhat.com 63C40334594
- Dmarc-filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 63C40334594
- References: <or37aadxgm.fsf@lxoliva.fsfla.org> <7b426b4d-d72b-041f-b9c3-367d3b4642f3@redhat.com>
On Jul 12, 2017, Nick Clifton <nickc@redhat.com> wrote:
> It looks like you are not including dwarf2dbg.h in read.c.
Fixed with the incremental patch below.
> It also looks like you are calling dwarf2_emit_insn() unconditionally,
> even for targets which do not use/support the DWARF format...
dwarf2_emit_insn starts with a test that should make that ok (I
successfully tested sparc-aout and sh-pe):
if (debug_type != DEBUG_DWARF2
? !dwarf2_loc_directive_seen
: !seen_at_least_1_file ())
return;
If we're not emitting dwarf2 line info from assembly sources, then we
will test dwarf2_loc_directive_seen, and that won't be set if we're not
handling .loc directives for dwarf2 line table output, so we will
return. Since dwarf2dbg is linked in unconditionally, the only thing we
were missing was function declarations.
diff --git a/gas/read.c b/gas/read.c
index 37a03a6..629e1a0 100644
--- a/gas/read.c
+++ b/gas/read.c
@@ -37,6 +37,7 @@
#include "macro.h"
#include "obstack.h"
#include "ecoff.h"
+#include "dwarf2dbg.h"
#include "dw2gencfi.h"
#include "wchar.h"
diff --git a/gas/subsegs.c b/gas/subsegs.c
index bb96142..76e3c6b 100644
--- a/gas/subsegs.c
+++ b/gas/subsegs.c
@@ -25,6 +25,8 @@
#include "subsegs.h"
#include "obstack.h"
+#include "dwarf2dbg.h"
+
frchainS *frchain_now;
static struct obstack frchains;
--
Alexandre Oliva, freedom fighter http://FSFLA.org/~lxoliva/
You must be the change you wish to see in the world. -- Gandhi
Be Free! -- http://FSFLA.org/ FSF Latin America board member
Free Software Evangelist|Red Hat Brasil GNU Toolchain Engineer