gdb-9.1 Fails to build: "invalid cast to abstract class type"

Chris Nicol nicolc@uleth.ca
Wed May 20 18:24:16 GMT 2020


Hello,

I am trying to build a new version of the debugger on a SunBlade 100 
running FreeBSD 12.1. This build fails with the following complaint:

   CXX    sparc64-fbsd-nat.o
In file included from ../../gdb/sparc64-fbsd-nat.c:26:
../../gdb/sparc-nat.h: In instantiation of 'target_xfer_status 
sparc_target<BaseTarget>::xfer_partial(target_object, const char*, 
gdb_byte*, const gdb_byte*, ULONGEST, ULONGEST, ULONGEST*) [with 
BaseTarget = fbsd_nat_target; gdb_byte = unsigned char; ULONGEST = long 
unsigned int]':
../../gdb/sparc-nat.h:67:27:   required from here
../../gdb/sparc-nat.h:78:12: error: invalid cast to abstract class type 
'fbsd_nat_target'
    78 |     return BaseTarget (object, annex, readbuf, writebuf,
       |            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    79 |          offset, len, xfered_len);
       |          ~~~~~~~~~~~~~~~~~~~~~~~~
In file included from ../../gdb/sparc64-fbsd-nat.c:24:
../../gdb/fbsd-nat.h:36:7: note:   because the following virtual 
functions are pure within 'fbsd_nat_target':
    36 | class fbsd_nat_target : public inf_ptrace_target
       |       ^~~~~~~~~~~~~~~
In file included from ../../gdb/inf-ptrace.h:23,
                  from ../../gdb/fbsd-nat.h:23,
                  from ../../gdb/sparc64-fbsd-nat.c:24:
../../gdb/inf-child.h:42:8: note: 	'virtual void 
inf_child_target::fetch_registers(regcache*, int)'
    42 |   void fetch_registers (struct regcache *, int) override = 0;
       |        ^~~~~~~~~~~~~~~
../../gdb/inf-child.h:43:8: note: 	'virtual void 
inf_child_target::store_registers(regcache*, int)'
    43 |   void store_registers (struct regcache *, int) override = 0;
       |        ^~~~~~~~~~~~~~~
gmake[2]: *** [Makefile:1656: sparc64-fbsd-nat.o] Error 1
gmake[2]: Leaving directory '/usr/home/nicolc/gdb/gdb-9.1/build/gdb'
gmake[1]: *** [Makefile:9563: all-gdb] Error 2
gmake[1]: Leaving directory '/usr/home/nicolc/gdb/gdb-9.1/build'
gmake: *** [Makefile:851: all] Error 2


Can anyone provide insight into what is going on here, please? Thank you.

Chris.
-- 
______________________________________________________________________



More information about the Gdb mailing list