public inbox for insight@sourceware.org
 help / color / mirror / Atom feed
* Clarifications regarding BDM GDB Insight for M68k
@ 2002-04-14 23:09 Prasanna - Khanapur
  2002-04-15  8:07 ` Keith Seitz
  0 siblings, 1 reply; 4+ messages in thread
From: Prasanna - Khanapur @ 2002-04-14 23:09 UTC (permalink / raw)
  To: insight

Hello,
I'm trying to make Insight GDB BDM for M68k processor in cygwin 
environment on an WINNT machine.
I installed the latest cygwin version on the WINNT and 
uncomopressed the insight-5.0.tar.bz2 file on the cygwin dir.
I ran the configure and make file :

>./configure --target=m68k-bdm-elf
>make

I faced few problems for which I made some fixes, some header 
files where not included so included the corresponding the files 
needed.

But at the end that is in the final linking of the gdb.exe I had 
faced the following errors:
************************************************************************************************************
gcc -g -O2       -Wl,--subsystem,console -o gdb.exe main.o 
libgdb.a    ../bfd/libbfd.a ../readline/libreadline.a 
../opcodes/libopcodes.a ./../intl/libintl.a 
../libiberty/libiberty.a `if test -r ../libtermcap/libtermcap.a; 
then echo ../libtermcap/libtermcap.a; else echo -ltermcap; fi`    
../libgui/src/libgui.a 
-L/home/taxi/insight-5.0/insight-5.0/itcl/itcl/win -litcl30 
-L/home/taxi/insight-5.0/insight-5.0/itcl/itk/win -litk30 
-L/home/taxi/insight-5.0/insight-5.0/tix/win/tcl8.0 -ltix4180 
-L/home/taxi/insight-5.0/insight-5.0/tk/win -ltk80 
-L/home/taxi/insight-5.0/insight-5.0/tcl/win -ltcl80      -lm -lm  
../libiberty/libiberty.a -luser32 -lshell32 -lgdi32 -lcomdlg32 
-ladvapi32
libgdb.a(gdbtk.o): In function `gdbtk_init':
/home/taxi/insight-5.0/insight-5.0/gdb/./gdbtk/generic/gdbtk.c:450: 
undefined reference to `ide_create_messagebox_command'
/home/taxi/insight-5.0/insight-5.0/gdb/./gdbtk/generic/gdbtk.c:453: 
undefined reference to `ide_create_sizebox_command'
/home/taxi/insight-5.0/insight-5.0/gdb/./gdbtk/generic/gdbtk.c:455: 
undefined reference to `ide_create_winprint_command'
/home/taxi/insight-5.0/insight-5.0/gdb/./gdbtk/generic/gdbtk.c:457: 
undefined reference to `ide_create_win_grab_command'
/home/taxi/insight-5.0/insight-5.0/gdb/./gdbtk/generic/gdbtk.c:462: 
undefined reference to `ide_create_shell_execute_command'
libgdb.a(gdbtk.o): In function `initialize_gdbtk':
/home/taxi/insight-5.0/insight-5.0/gdb/./gdbtk/generic/gdbtk.c:603: 
undefined reference to `FreeConsole'
/home/taxi/insight-5.0/insight-5.0/gdb/./gdbtk/generic/gdbtk.c:609: 
undefined reference to `GetStdHandle'
/home/taxi/insight-5.0/insight-5.0/gdb/./gdbtk/generic/gdbtk.c:609: 
undefined reference to `GetFileType'
/home/taxi/insight-5.0/insight-5.0/gdb/./gdbtk/generic/gdbtk.c:620: 
undefined reference to `AllocConsole'
/home/taxi/insight-5.0/insight-5.0/gdb/./gdbtk/generic/gdbtk.c:621: 
undefined reference to `GetStdHandle'
/home/taxi/insight-5.0/insight-5.0/gdb/./gdbtk/generic/gdbtk.c:624: 
undefined reference to `GetStdHandle'
/home/taxi/insight-5.0/insight-5.0/gdb/./gdbtk/generic/gdbtk.c:627: 
undefined reference to `GetStdHandle'
../libgui/src/libgui.a(tkTable.o): In function `TableDisplay':
/home/taxi/insight-5.0/insight-5.0/libgui/src/tkTable.c:1188: 
undefined reference to `XSetClipRectangles'
../libgui/src/libgui.a(tkTable.o): In function 
`TableValidateChange':
/home/taxi/insight-5.0/insight-5.0/libgui/src/tkTable.c:2481: 
undefined reference to `XSync'
collect2: ld returned 1 exit status
make[1]: *** [gdb.exe] Error 1
make[1]: Leaving directory 
`/home/taxi/insight-5.0/insight-5.0/gdb'
make: *** [all-gdb] Error 2

*********************************************************************************************************

After analysing the above errors in the function 'gdbtk_init' I 
found that _WIN32 is not  defined in the compilation
of some files like tclmsgbox.c ,tclsizebox.c etc..
Do I need to give any other parameter for the while running the 
./confiure file such that this _WIN32 is added on to the makefiles 
directly?

To solve the problem I defined -D_WIN32 as one of the  compiler 
options in the makefile.in.
After that I gave again compilation this time the follwing error 
is reported

*********************************************************************************************************
gcc -g -O2       -Wl,--subsystem,console -o gdb.exe main.o 
libgdb.a    ../bfd/libbfd.a ../readline/libreadl
libgdb.a(gdbtk.o): In function `initialize_gdbtk':
/home/taxi/insight-5.0/insight-5.0/gdb/./gdbtk/generic/gdbtk.c:603: 
undefined reference to `FreeConsole'
/home/taxi/insight-5.0/insight-5.0/gdb/./gdbtk/generic/gdbtk.c:609: 
undefined reference to `GetStdHandle'
/home/taxi/insight-5.0/insight-5.0/gdb/./gdbtk/generic/gdbtk.c:609: 
undefined reference to `GetFileType'
/home/taxi/insight-5.0/insight-5.0/gdb/./gdbtk/generic/gdbtk.c:620: 
undefined reference to `AllocConsole'
/home/taxi/insight-5.0/insight-5.0/gdb/./gdbtk/generic/gdbtk.c:621: 
undefined reference to `GetStdHandle'
/home/taxi/insight-5.0/insight-5.0/gdb/./gdbtk/generic/gdbtk.c:624: 
undefined reference to `GetStdHandle'
/home/taxi/insight-5.0/insight-5.0/gdb/./gdbtk/generic/gdbtk.c:627: 
undefined reference to `GetStdHandle'
collect2: ld returned 1 exit status
make[1]: *** [gdb.exe] Error 1
make[1]: Leaving directory 
`/home/taxi/insight-5.0/insight-5.0/gdb'
make: *** [all-gdb] Error 2
*********************************************************************************************************


I searched for this functions in the whole directory but could not  
find them.
If anybody can help out with few of above problems it would be 
help.
Please let me know whether whatever I have done is correct.


Regards
Prasanna.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Clarifications regarding BDM GDB Insight for M68k
  2002-04-14 23:09 Clarifications regarding BDM GDB Insight for M68k Prasanna - Khanapur
@ 2002-04-15  8:07 ` Keith Seitz
  0 siblings, 0 replies; 4+ messages in thread
From: Keith Seitz @ 2002-04-15  8:07 UTC (permalink / raw)
  To: Prasanna - Khanapur; +Cc: insight

On 15 Apr 2002, Prasanna - Khanapur wrote:

> Hello,
> I'm trying to make Insight GDB BDM for M68k processor in cygwin
> environment on an WINNT machine.
> I installed the latest cygwin version on the WINNT and
> uncomopressed the insight-5.0.tar.bz2 file on the cygwin dir.

Insight-5.0 is not the latest version. Make sure you are trying to build
insight-5.1.

Your libgui problems should be fixed by using "-mwin32". There was a
change in gcc for cygwin between 5.0 and 5.1 which necessitates this flag.
I don't recall if the 5.1 branch sources have this in it or not, so it
might be needed there. (And don't include '-mwin32' everywhere -- just put
it where needed.)

Please verify which version of insight you are trying to build and get
back to us.

Keith


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Clarifications regarding BDM GDB Insight for M68k
  2002-04-16  6:54 ` Kai Ruottu
@ 2002-04-16  9:07   ` Keith Seitz
  0 siblings, 0 replies; 4+ messages in thread
From: Keith Seitz @ 2002-04-16  9:07 UTC (permalink / raw)
  To: Prasanna - Khanapur; +Cc: Insight Maling List

On Tue, 16 Apr 2002, Kai Ruottu wrote:

> > *****************************************************
> >
> > $ nm libkernel32.a |grep FreeConsole
> > 00000000 T _FreeConsole@0
> > 00000000 I __imp__FreeConsole@0
> >
> > ****************************************************
>
>  As you can see the symbol name is not 'FreeConsole', but instead
> 'FreeConsole@0' !!!  So here should be your clue and asking why
> the '@0' is there would give you a sane answer from anyone familiar
> with the Cygwin or Mingw target...

Doh! I completely overlooked this.. What happens when you use "-mwin32"
instbead of "-D_WIN32" (or in addition to)?

Keith


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Clarifications regarding BDM GDB Insight for M68k
  2002-04-15  9:25 Prasanna - Khanapur
@ 2002-04-16  6:54 ` Kai Ruottu
  2002-04-16  9:07   ` Keith Seitz
  0 siblings, 1 reply; 4+ messages in thread
From: Kai Ruottu @ 2002-04-16  6:54 UTC (permalink / raw)
  To: Prasanna - Khanapur; +Cc: insight, Keith Seitz

Prasanna - Khanapur wrote:
> 
> But the few other error still persists as fallows:
> 
> *****************************************************
> gcc -g -O2       -Wl,--subsystem,console -o gdb.exe main.o
> libgdb.a    ../bfd/libbfd.a ../readline/libreadl
> libgdb.a(gdbtk.o): In function `initialize_gdbtk':
> /home/taxi/insight-5.0/insight-5.0/gdb/./gdbtk/generic/gdbtk.c:603:
> undefined reference to `FreeConsole'
> /home/taxi/insight-5.0/insight-5.0/gdb/./gdbtk/generic/gdbtk.c:609:
> undefined reference to `GetStdHandle'
> 
> I searched for the function "FreeConsole()" and could find it in
> the /cygwin/lib/w32api/  in the libkernel32.a.
> The following was output after nm.exe:
> 
> *****************************************************
> 
> $ nm libkernel32.a |grep FreeConsole
> 00000000 T _FreeConsole@0
> 00000000 I __imp__FreeConsole@0
> 
> ****************************************************

 As you can see the symbol name is not 'FreeConsole', but instead
'FreeConsole@0' !!!  So here should be your clue and asking why
the '@0' is there would give you a sane answer from anyone familiar
with the Cygwin or Mingw target...

> So I guess that the definition of the unreferenced function is
> present in the libkernel32.a.
> I added the libkernel32.a to the final linking of gdb.exe.
> But still the error persist , what could be the problem?

 The answer is that the function prototype should declare this being
a 'WINAPI'-function :

    E:\usr\local\i386-mingw32msvc\sys-include>grep FreeConsole *.h
    wincon.h:BOOL WINAPI FreeConsole(void);

 The 'w32api'-headers (should be common for Cygwin and Mingw) should
declare this function as seen previously... So the 'gdbtk.c' doesn't
include the needed 'wincon.h' directly or via some other header, and
this causes the symbol name not being 'mangled' this way...

 I don't know whether '#include <windows.h>' should include <wincon.h>
too, or not, or what could be the 'right' fix... It can be to add the
'#include <wincon.h>' into some w32api-header which should now include
it, or to add this into the 'gdbtk.c' itself. But as an local workaround
the last choice could be the best...

Cheers, Kai

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2002-04-16 16:07 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-04-14 23:09 Clarifications regarding BDM GDB Insight for M68k Prasanna - Khanapur
2002-04-15  8:07 ` Keith Seitz
2002-04-15  9:25 Prasanna - Khanapur
2002-04-16  6:54 ` Kai Ruottu
2002-04-16  9:07   ` Keith Seitz

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).