This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH 2/7] Move some integer operations to common.
- From: Antoine Tremblay <antoine dot tremblay at ericsson dot com>
- To: Doug Evans <dje at google dot com>
- Cc: Pedro Alves <palves at redhat dot com>, Gary Benson <gbenson at redhat dot com>, gdb-patches <gdb-patches at sourceware dot org>
- Date: Thu, 24 Sep 2015 07:53:21 -0400
- Subject: Re: [PATCH 2/7] Move some integer operations to common.
- Authentication-results: sourceware.org; auth=none
- References: <001a113448083110dd05207021ae at google dot com>
On 09/23/2015 04:40 PM, Doug Evans wrote:
> It would also introduce a bfd version dependency in common code to
check
> for this static header. And it could be quite an ugly #ifdef changing
> ints to enum in case the header is present.
This is a non-issue. gdb always uses bfd HEAD, and in general
we don't support uses of bfd outside of binutils and gdb.
Ok thanks, good to know.
> One thing to consider too is that this patchset has now changed a bit
> and this enum is no longer used in GDBServer itself at all.
I'm less interested in whether the enum is used in gdbserver than
whether it is used in the common code (and thus by extension
it still matters what gdbserver uses).
Humm I think this will become more clear when I post the updated
pathset, I suggest we restart this point when I do that if needed.
We *could* just use a bool, is_big_endian or is_little_endian.
The code today assumes it never sees BFD_ENDIAN_UNKNOWN,
which would be nice to fix.
Or we could invent a new enum that just has big/little endian.
Given that BFD_ENDIAN_UNKNOWN is used in a few places in GDB I would
move to fix the functions where it's not taken into consideration and
should be... but it can be part of another patch set.