* [PATCH] Include s12z-opc.h using ../opcodes. [not found] <20190801170141.198456-1-cbiesinger@google.com> @ 2019-08-01 17:26 ` Christian Biesinger via gdb-patches 2019-08-01 17:30 ` Simon Marchi 2019-08-02 18:22 ` [PATCH] Include s12z-opc.h using Tom Tromey 1 sibling, 1 reply; 4+ messages in thread From: Christian Biesinger via gdb-patches @ 2019-08-01 17:26 UTC (permalink / raw) To: gdb-patches; +Cc: Christian Biesinger This file exists in binutils-gdb/opcodes, and nothing in Makefile.in adds this to the include path. Default builds work because in-tree readline adds binutils-gdb/ to the include path (!). However, this is broken when compiling with system readline. Other files already use this way to include files in opcodes: ./gdb/lm32-tdep.c:#include "../opcodes/lm32-desc.h" ./gdb/or1k-tdep.h:#include "../opcodes/or1k-desc.h" ./gdb/mep-tdep.c:#include "../opcodes/mep-desc.h" etc. gdb/ChangeLog: 2019-08-01 Christian Biesinger <cbiesinger@google.com> * s12z-tdep.c: Fix include path for s12z-opc.h. --- gdb/s12z-tdep.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gdb/s12z-tdep.c b/gdb/s12z-tdep.c index a9d20e809c..a1c085cfbb 100644 --- a/gdb/s12z-tdep.c +++ b/gdb/s12z-tdep.c @@ -30,7 +30,7 @@ #include "opcode/s12z.h" #include "trad-frame.h" #include "remote.h" -#include "opcodes/s12z-opc.h" +#include "../opcodes/s12z-opc.h" /* Two of the registers included in S12Z_N_REGISTERS are the CCH and CCL "registers" which are just views into -- 2.22.0.770.g0f2c4a37fd-goog ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] Include s12z-opc.h using ../opcodes. 2019-08-01 17:26 ` [PATCH] Include s12z-opc.h using ../opcodes Christian Biesinger via gdb-patches @ 2019-08-01 17:30 ` Simon Marchi 2019-08-01 17:46 ` Christian Biesinger via gdb-patches 0 siblings, 1 reply; 4+ messages in thread From: Simon Marchi @ 2019-08-01 17:30 UTC (permalink / raw) To: Christian Biesinger, gdb-patches On 2019-08-01 1:26 p.m., Christian Biesinger via gdb-patches wrote: > This file exists in binutils-gdb/opcodes, and nothing in Makefile.in adds this > to the include path. Default builds work because in-tree readline adds > binutils-gdb/ to the include path (!). However, this is broken when compiling > with system readline. Yeah, my guess is that the include path is added when using the in-tree readline to make #include "readline/readline.h" work. And it made this include work by chance. > Other files already use this way to include files in opcodes: > ./gdb/lm32-tdep.c:#include "../opcodes/lm32-desc.h" > ./gdb/or1k-tdep.h:#include "../opcodes/or1k-desc.h" > ./gdb/mep-tdep.c:#include "../opcodes/mep-desc.h" > > etc. > > gdb/ChangeLog: > > 2019-08-01 Christian Biesinger <cbiesinger@google.com> > > * s12z-tdep.c: Fix include path for s12z-opc.h. > --- > gdb/s12z-tdep.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/gdb/s12z-tdep.c b/gdb/s12z-tdep.c > index a9d20e809c..a1c085cfbb 100644 > --- a/gdb/s12z-tdep.c > +++ b/gdb/s12z-tdep.c > @@ -30,7 +30,7 @@ > #include "opcode/s12z.h" > #include "trad-frame.h" > #include "remote.h" > -#include "opcodes/s12z-opc.h" > +#include "../opcodes/s12z-opc.h" > > /* Two of the registers included in S12Z_N_REGISTERS are > the CCH and CCL "registers" which are just views into > Thanks, the patch LGTM. Simon ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] Include s12z-opc.h using ../opcodes. 2019-08-01 17:30 ` Simon Marchi @ 2019-08-01 17:46 ` Christian Biesinger via gdb-patches 0 siblings, 0 replies; 4+ messages in thread From: Christian Biesinger via gdb-patches @ 2019-08-01 17:46 UTC (permalink / raw) To: Simon Marchi; +Cc: Christian Biesinger via gdb-patches On Thu, Aug 1, 2019 at 12:30 PM Simon Marchi <simark@simark.ca> wrote: > > On 2019-08-01 1:26 p.m., Christian Biesinger via gdb-patches wrote: > > This file exists in binutils-gdb/opcodes, and nothing in Makefile.in adds this > > to the include path. Default builds work because in-tree readline adds > > binutils-gdb/ to the include path (!). However, this is broken when compiling > > with system readline. > > Yeah, my guess is that the include path is added when using the in-tree readline to make > #include "readline/readline.h" work. And it made this include work by chance. > > > Other files already use this way to include files in opcodes: > > ./gdb/lm32-tdep.c:#include "../opcodes/lm32-desc.h" > > ./gdb/or1k-tdep.h:#include "../opcodes/or1k-desc.h" > > ./gdb/mep-tdep.c:#include "../opcodes/mep-desc.h" > > > > etc. > > > > gdb/ChangeLog: > > > > 2019-08-01 Christian Biesinger <cbiesinger@google.com> > > > > * s12z-tdep.c: Fix include path for s12z-opc.h. > > --- > > gdb/s12z-tdep.c | 2 +- > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > diff --git a/gdb/s12z-tdep.c b/gdb/s12z-tdep.c > > index a9d20e809c..a1c085cfbb 100644 > > --- a/gdb/s12z-tdep.c > > +++ b/gdb/s12z-tdep.c > > @@ -30,7 +30,7 @@ > > #include "opcode/s12z.h" > > #include "trad-frame.h" > > #include "remote.h" > > -#include "opcodes/s12z-opc.h" > > +#include "../opcodes/s12z-opc.h" > > > > /* Two of the registers included in S12Z_N_REGISTERS are > > the CCH and CCL "registers" which are just views into > > > Thanks, the patch LGTM. Thanks, pushed. ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] Include s12z-opc.h using .. [not found] <20190801170141.198456-1-cbiesinger@google.com> 2019-08-01 17:26 ` [PATCH] Include s12z-opc.h using ../opcodes Christian Biesinger via gdb-patches @ 2019-08-02 18:22 ` Tom Tromey 1 sibling, 0 replies; 4+ messages in thread From: Tom Tromey @ 2019-08-02 18:22 UTC (permalink / raw) To: Gdb Patches >>>>> "Christian" == Christian Biesinger via gdb-patches <gdb-patches@sourceware.org> writes: Christian> I must be missing something; I don't see how this can compile? Christian> This file exists in binutils-gdb/opcodes, and as far as I can tell Christian> nothing in Makefile.in adds this to the include path. This patch Christian> makes my compile work (when using --enable-targets=all). This patch made me realize that moving gdbsupport to top-level is going to run into this same issue. I hadn't considered the --with-system-readline case here :-( I thought of 3 options: 1. Move all the gdbsupport headers into a subdirectory, either of gdbsupport or include. 2. Add a -I for gdbsupport and change how the #includes are written -- dropping the "gdbsupport/" part. 3. Make a new "readline/readline" directory and move the contents there, similar to what is done for gnulib. On the whole I lean toward plan 3, because it would also let us handle opcodes includes in a less ugly way. Tom ^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2019-08-02 18:22 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <20190801170141.198456-1-cbiesinger@google.com>
2019-08-01 17:26 ` [PATCH] Include s12z-opc.h using ../opcodes Christian Biesinger via gdb-patches
2019-08-01 17:30 ` Simon Marchi
2019-08-01 17:46 ` Christian Biesinger via gdb-patches
2019-08-02 18:22 ` [PATCH] Include s12z-opc.h using Tom Tromey
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox