Discussion:
[Bug build/23415] New: binutils-gdb/gdb/ia64-tdep.c:2664:16: error: too many arguments to function target_read_alloc
slyfox at inbox dot ru
2018-07-15 05:34:29 UTC
Permalink
https://sourceware.org/bugzilla/show_bug.cgi?id=23415

Bug ID: 23415
Summary: binutils-gdb/gdb/ia64-tdep.c:2664:16: error: too many
arguments to function target_read_alloc
Product: gdb
Version: unknown
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: build
Assignee: unassigned at sourceware dot org
Reporter: slyfox at inbox dot ru
Target Milestone: ---

gdb fails to build on ia64 (looks like API to read data from core files changed
slightly). Current binutils-gdb git master:

$ ../binutils-gdb/configure --build=x86_64-pc-linux-gnu
--host=ia64-unknown-linux-gnu --target=ia64-unknown-linux-gnu
$ make

ia64-unknown-linux-gnu-g++ -x c++ -g -O2 -I. -I../../binutils-gdb/gdb
-I../../binutils-gdb/gdb/common -I../../binutils-gdb/gdb/config
-DLOCALEDIR="\"/usr/local/share/locale\"" -DHAVE_CONFIG_H
-I../../binutils-gdb/gdb/../include/opcode
-I../../binutils-gdb/gdb/../opcodes/.. -I../../binutils-gdb/gdb/../readline/..
-I../../binutils-gdb/gdb/../zlib -I../bfd -I../../binutils-gdb/gdb/../bfd
-I../../binutils-gdb/gdb/../include -I../libdecnumber
-I../../binutils-gdb/gdb/../libdecnumber
-I../../binutils-gdb/gdb/gnulib/import -Ibuild-gnulib/import -DTUI=1 -Wall
-Wpointer-arith -Wno-unused -Wunused-value -Wunused-function -Wno-switch
-Wno-char-subscripts -Wempty-body -Wunused-but-set-parameter
-Wunused-but-set-variable -Wno-sign-compare -Wno-narrowing
-Wno-error=maybe-uninitialized -Wsuggest-override -Wimplicit-fallthrough=3
-Wduplicated-cond -Wformat-nonliteral -Werror -c -o ia64-tdep.o -MT ia64-tdep.o
-MMD -MP -MF ./.deps/ia64-tdep.Tpo ../../binutils-gdb/gdb/ia64-tdep.c
../../binutils-gdb/gdb/ia64-tdep.c: In function 'LONGEST
getunwind_table(gdb_byte**)':
../../binutils-gdb/gdb/ia64-tdep.c:2664:16: error: too many arguments to
function 'gdb::optional<std::vector<unsigned char,
gdb::default_init_allocator<unsigned char, std::allocator<unsigned char> > > >
target_read_alloc(target_ops*, target_object, const char*)'
NULL, buf_p);
^
In file included from ../../binutils-gdb/gdb/inferior.h:41,
from ../../binutils-gdb/gdb/ia64-tdep.c:21:
../../binutils-gdb/gdb/target.h:341:40: note: declared here
extern gdb::optional<gdb::byte_vector> target_read_alloc
^~~~~~~~~~~~~~~~~
../../binutils-gdb/gdb/ia64-tdep.c:2664:16: error: cannot convert
'gdb::optional<std::vector<unsigned char, gdb::default_init_allocator<unsigned
char, std::allocator<unsigned char> > > >' to 'LONGEST' {aka 'long int'} in
assignment
NULL, buf_p);
^
--
You are receiving this mail because:
You are on the CC list for the bug.
simon.marchi at ericsson dot com
2018-07-16 18:01:44 UTC
Permalink
https://sourceware.org/bugzilla/show_bug.cgi?id=23415

Simon Marchi <simon.marchi at ericsson dot com> changed:

What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
CC| |simon.marchi at ericsson dot com
Resolution|--- |FIXED

--- Comment #1 from Simon Marchi <simon.marchi at ericsson dot com> ---
This should be fixed now, with commit 5d691c8 ("Fix compilation error in
ia64-tdep.c with libunwind-ia64").
--
You are receiving this mail because:
You are on the CC list for the bug.
slyfox at inbox dot ru
2018-07-16 20:27:53 UTC
Permalink
https://sourceware.org/bugzilla/show_bug.cgi?id=23415

--- Comment #2 from Sergei Trofimovich <slyfox at inbox dot ru> ---
There is a few more minor build failures (likely triggered by maintainer-mode
and type mismatch). Should I file another bug for it?

make[3]: Leaving directory '/home/slyfox/dev/git/binutils-gdb-ia64/gdb'
ia64-unknown-linux-gnu-g++ -x c++ -g -O2 -I. -I../../binutils-gdb/gdb
-I../../binutils-gdb/gdb/common -I../../binutils-gdb/gdb/config
-DLOCALEDIR="\"/usr/local/share/locale\"" -DHAVE_CONFIG_H
-I../../binutils-gdb/gdb/../include/opcode
-I../../binutils-gdb/gdb/../opcodes/.. -I../../binutils-gdb/gdb/../readline/..
-I../../binutils-gdb/gdb/../zlib -I../bfd -I../../binutils-gdb/gdb/../bfd
-I../../binutils-gdb/gdb/../include -I../libdecnumber
-I../../binutils-gdb/gdb/../libdecnumber
-I../../binutils-gdb/gdb/gnulib/import -Ibuild-gnulib/import -DTUI=1 -Wall
-Wpointer-arith -Wno-unused -Wunused-value -Wunused-function -Wno-switch
-Wno-char-subscripts -Wempty-body -Wunused-but-set-parameter
-Wunused-but-set-variable -Wno-sign-compare -Wno-narrowing
-Wno-error=maybe-uninitialized -Wsuggest-override -Wimplicit-fallthrough=3
-Wduplicated-cond -Wformat-nonliteral -Werror -c -o ia64-linux-nat.o -MT
ia64-linux-nat.o -MMD -MP -MF ./.deps/ia64-linux-nat.Tpo
../../binutils-gdb/gdb/ia64-linux-nat.c
../../binutils-gdb/gdb/ia64-linux-nat.c:73:8: error: conflicting return type
specified for 'virtual bool ia64_linux_nat_target::have_steppable_watchpoint()'
bool have_steppable_watchpoint () { return 1; }
^~~~~~~~~~~~~~~~~~~~~~~~~
In file included from ../../binutils-gdb/gdb/inferior.h:41,
from ../../binutils-gdb/gdb/ia64-linux-nat.c:22:
../../binutils-gdb/gdb/target.h:554:17: note: overridden function is 'virtual
int target_ops::have_steppable_watchpoint()'
virtual int have_steppable_watchpoint ()
^~~~~~~~~~~~~~~~~~~~~~~~~
../../binutils-gdb/gdb/ia64-linux-nat.c:73:8: error: 'virtual bool
ia64_linux_nat_target::have_steppable_watchpoint()' can be marked override
[-Werror=suggest-override]
bool have_steppable_watchpoint () { return 1; }
^~~~~~~~~~~~~~~~~~~~~~~~~
../../binutils-gdb/gdb/ia64-linux-nat.c:723:1: error: 'int
ia64_linux_can_use_hw_breakpoint(target_ops*, bptype, int, int)' defined but
not used [-Werror=unused-function]
ia64_linux_can_use_hw_breakpoint (struct target_ops *self,
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../../binutils-gdb/gdb/ia64-linux-nat.c:676:1: error: 'void
ia64_linux_new_thread(lwp_info*)' defined but not used
[-Werror=unused-function]
ia64_linux_new_thread (struct lwp_info *lp)
^~~~~~~~~~~~~~~~~~~~~
cc1plus: all warnings being treated as errors
--
You are receiving this mail because:
You are on the CC list for the bug.
simon.marchi at ericsson dot com
2018-07-16 20:35:01 UTC
Permalink
https://sourceware.org/bugzilla/show_bug.cgi?id=23415

--- Comment #3 from Simon Marchi <simon.marchi at ericsson dot com> ---
I don't have easy access to an ia64 cross compiler (there is no Ubuntu package
for it). The best would be if you could submit a patch for that to
gdb-***@sourceware.org.

Thanks,

Simon
--
You are receiving this mail because:
You are on the CC list for the bug.
Loading...