This is the mail archive of the gdb@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: GDB for PE/Cywin target won't build on linux


On Jul 16, 11:49am, Stephen Smith wrote:

> Since the embedded target OS is close to windows/cygwin in
> functionality, I choose to try the config/i386/cygwin.mt file.
> 
> Therefore, I added the following line to configure.tgt
>  i[3456]86-*-pe*)        gdb_target=cygwin ;;

I'm not convinced this was the best idea, but it was certainly
worth a try.

> I then did the usual configure/make step and recieved the following
> error sequence.  The wierd pard is that the missing symbols are in
> gdb/win32-nat.c which isn't getting compiled.  The file is listed in
> the ALLDEPFILES, but isn't listed in TSOBS, COMMON_OBS, or
> ADD_FILES.

It appears to me that you can't build a cross debugger where cygwin
is the target.  This is unfortunate, but it appears that the shared
library support requires that you run a native GDB.

> Am I correct in assuming that it needs to be listed somewhere else? 
> Is there a gdb way, or should I do what looks good.

I think you should abandon the ``gdb_target=cygwin'' approach.  The
shared library support in win32-nat.c will not do what you want for a
cross debugger.  I've glanced over the code and it does not look easy
to fix it for your purposes either.  This is why it's in win32-nat.c
instead of somewhere else.  Ideally though, I think it would be a
good idea for the solib support to be migrated to solib-win32 or somesuch.
That way it could make use of the existing (common) solib machinery,
though it would still not support cross debugging without some
significant rewriting and cooperation from gdbserver.

For your purposes, I think it'd be better to just use ``gdb_target=embed''.
You'll avoid the shared library nightmares that way.  If you find that
you need some sort of shared library support, you'll have to implement
it separately.  (This'll likely mean creating a new *.mt file, a new
tm-*.h file, and a new solib-*.c file which'll have the shared library
support that you need.)

Kevin


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]