* gnu-win32 B19: gdb and template
@ 1998-10-09 19:52 Xiaomao Xiao
1998-10-10 1:57 ` Alexandre Oliva
0 siblings, 1 reply; 3+ messages in thread
From: Xiaomao Xiao @ 1998-10-09 19:52 UTC (permalink / raw)
To: egcs
Hi there:
I recently tried to debug a c++ program with templates on my Windows NT box
installed with gnu-win32 B19. I found that I cannot step into the
implementation of a template. I prepared a simple example here to show what I
mean. Any advice is appreciated.
==================================
#include <stream.h>
template <class T>
void Print(const T & a)
{
cout << a << endl;
}
void Print1(const float & a)
{
cout << a << endl;
}
void Print1(const double & a)
{
cout << a << endl;
}
main()
{
Print(0.5);
Print(0.4f);
Print1(0.5);
Print1(0.4f);
}
==================================
I used this command to compile the program: gcc -gstabs+ test.cpp -lstdc++.
When I tried to debug the program with gdb (4.16-B19), I could not step into the
template function Print(). However I can step into function Print1().
What should I do to solve this problem? Thanks!
--
Xiaomao
=================================================================
Xiaomao (Mark) Xiao E-Mail: xiao@cmold.com
C-MOLD TEL: (607) 257-4949 x 699
31 Dutch Mill Road FAX: (607) 257-6355
Ithaca, NY 14850 URL: http://www.cmold.com
=================================================================
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: gnu-win32 B19: gdb and template
1998-10-09 19:52 gnu-win32 B19: gdb and template Xiaomao Xiao
@ 1998-10-10 1:57 ` Alexandre Oliva
1998-10-12 20:53 ` Xiaomao Xiao
0 siblings, 1 reply; 3+ messages in thread
From: Alexandre Oliva @ 1998-10-10 1:57 UTC (permalink / raw)
To: xiao; +Cc: egcs
Xiaomao Xiao <xiao@cmold.com> writes:
> I recently tried to debug a c++ program with templates on my Windows NT box
> installed with gnu-win32 B19.
Have you installed egcs? AFAIK, gnu-win32 B19 comes with gcc 2.7.*,
run gcc -v to check. gcc 2.7 has some bugs in the generation of
debugging information and, AFAIK, so does gdb 4.16. You may want to
install gdb 4.17 too.
--
Alexandre Oliva
mailto:oliva@dcc.unicamp.br mailto:oliva@gnu.org mailto:aoliva@acm.org
http://www.dcc.unicamp.br/~oliva
Universidade Estadual de Campinas, SP, Brasil
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: gnu-win32 B19: gdb and template
1998-10-10 1:57 ` Alexandre Oliva
@ 1998-10-12 20:53 ` Xiaomao Xiao
0 siblings, 0 replies; 3+ messages in thread
From: Xiaomao Xiao @ 1998-10-12 20:53 UTC (permalink / raw)
To: Alexandre Oliva; +Cc: egcs, gnu-win32
Hi there:
I think that I use the latest egcs. My gcc is egcs-2.91.57. But my gdb is
probably 'old.' It is 4.16-B19. I couldn't find a gdb 4.17. So I decided to
build one myself. But the configuration stage failed: cannot find a compatible
ld. My ld is 2.9.4 (with BFD 980830). Any idea what I should do with this
kind of situation? Do you know where I can get a precompiled binary of gdb
4.14? Thanks.
>>>>> "Alexandre" == Alexandre Oliva <oliva@dcc.unicamp.br> writes:
Alexandre> Xiaomao Xiao <xiao@cmold.com> writes:
>> I recently tried to debug a c++ program with templates on my Windows NT box
>> installed with gnu-win32 B19.
Alexandre> Have you installed egcs? AFAIK, gnu-win32 B19 comes with gcc 2.7.*,
Alexandre> run gcc -v to check. gcc 2.7 has some bugs in the generation of
Alexandre> debugging information and, AFAIK, so does gdb 4.16. You may want to
Alexandre> install gdb 4.17 too.
Alexandre> -- Alexandre Oliva mailto:oliva@dcc.unicamp.br mailto:oliva@gnu.org
Alexandre> mailto:aoliva@acm.org http://www.dcc.unicamp.br/~oliva Universidade
Alexandre> Estadual de Campinas, SP, Brasil
--
Xiaomao
=================================================================
Xiaomao (Mark) Xiao E-Mail: xiao@cmold.com
C-MOLD TEL: (607) 257-4949 x 699
31 Dutch Mill Road FAX: (607) 257-6355
Ithaca, NY 14850 URL: http://www.cmold.com
=================================================================
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~1998-10-12 20:53 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1998-10-09 19:52 gnu-win32 B19: gdb and template Xiaomao Xiao
1998-10-10 1:57 ` Alexandre Oliva
1998-10-12 20:53 ` Xiaomao Xiao
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).