This is the mail archive of the
gdb@sources.redhat.com
mailing list for the GDB project.
Re: Add systemc simulator with gdb
- From: Richard Earnshaw <rearnsha at arm dot com>
- To: "Vineet Sharma, Noida" <vineets at noida dot hcltech dot com>
- Cc: gdb at sources dot redhat dot com, Richard dot Earnshaw at arm dot com
- Date: Wed, 18 Feb 2004 14:52:05 +0000
- Subject: Re: Add systemc simulator with gdb
- Organization: ARM Ltd.
- Reply-to: Richard dot Earnshaw at arm dot com
>
> Hi All,
>
> Is there any examples who have sucessfully integrated there
> simulators in c++ or systemc with gdb?
I'm guessing that most people on this list won't even know what systemc is
[*], let alone really understand what question you are asking.
> What are the issues faced in that approach?
gdb can be used for debugging c++ and other normal programming languages.
It isn't really an HDL debugger.
>
> I found the problem of conflicting types of bfd in bfd.h and
> remote-sim.h(:67). Any idea how to overcome it?
>
> ../../include/gdb/remote-sim.h:67: conflicting types for `struct bfd'
> /usr/include/bfd.h:78: previous declaration as `typedef struct _bfd bfd'
> ../../include/gdb/remote-sim.h:108: using typedef-name `bfd' after `struct'
> ../../include/gdb/remote-sim.h:145: using typedef-name `bfd' after `struct'
> ../../include/gdb/remote-sim.h:165: using typedef-name `bfd' after `struct'
> I think its bcoz of the difference in c++/g++ and gcc handling of
> forward declaration?
>
GDB is written in C, and needs to be compiled with a C compiler. It's not
C++, and I guess that if you try and compile it with G++ you'll get error
messages much like the one above.
R.
[*] For the uninitiated, SystemC started life as a simulation class
library for C++ which enables you to use C++ in much the same way as you
would any other HDL (Hardware description language). However, by
restricting your description a suitable subset of C++ you can then
accelerate it significantly with special simulators and even run hardware
synthesis tools on it. The real power comes from the fact that your test
benches can be written in abstract C++ and can then interact with your
hardware description directly.