Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > C++ > Debugging a C++ program that uses C code.

Reply
Thread Tools

Debugging a C++ program that uses C code.

 
 
DaLoverhino
Guest
Posts: n/a
 
      11-30-2006
Hello. I think I messed up my last post. Sorry about that.

I have a C++ program made up of two cpp files. I have the following
makefile:

stepprog: main.o parse_sql.o
c++ main.o parse_sql.o -o stepprog

main.o: main.c IWCallback.h parse_sql.h
c++ -g -c main.cpp

parse_sql.o: parse_sql.cpp parse_sql.h
c++ -g -c parse_sql.cpp

main.c parse_sql.c IWCallback.h parse_sql.h:


Now, when I try to set a break point in the top function of
parse_sql.o, the debugger always complains that this module doesn't
have any debugger information. main.o has debugger information, so I
can always set breakpoint in that piece of code.

Anyways, I'm wondering why this might be so, and the only thing I can
think of is that parse_sql.c has all code declared as extern "C". Is
this true? And if so, how do I get around it? Anyone have ideas?

I'm on solaris 5.8 using the solaris compiler and dbx.

Thanks.

 
Reply With Quote
 
 
 
 
Jack Klein
Guest
Posts: n/a
 
      11-30-2006
On 29 Nov 2006 16:03:15 -0800, "DaLoverhino" <>
wrote in comp.lang.c++:

> Hello. I think I messed up my last post. Sorry about that.
>
> I have a C++ program made up of two cpp files. I have the following
> makefile:
>
> stepprog: main.o parse_sql.o
> c++ main.o parse_sql.o -o stepprog
>
> main.o: main.c IWCallback.h parse_sql.h
> c++ -g -c main.cpp
>
> parse_sql.o: parse_sql.cpp parse_sql.h
> c++ -g -c parse_sql.cpp
>
> main.c parse_sql.c IWCallback.h parse_sql.h:
>
>
> Now, when I try to set a break point in the top function of
> parse_sql.o, the debugger always complains that this module doesn't
> have any debugger information. main.o has debugger information, so I
> can always set breakpoint in that piece of code.
>
> Anyways, I'm wondering why this might be so, and the only thing I can
> think of is that parse_sql.c has all code declared as extern "C". Is
> this true? And if so, how do I get around it? Anyone have ideas?
>
> I'm on solaris 5.8 using the solaris compiler and dbx.


There is nothing in the C++ language that specifies the workings of
debuggers or debugging information. This is all specific to your tool
set, and not a language issue.

You need to find a group to post in the supports your compiler/OS
combination, if there is one, or perhaps contact Sun's technical
support.

--
Jack Klein
Home: http://JK-Technology.Com
FAQs for
comp.lang.c http://c-faq.com/
comp.lang.c++ http://www.parashift.com/c++-faq-lite/
alt.comp.lang.learn.c-c++
http://www.contrib.andrew.cmu.edu/~a...FAQ-acllc.html
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
problem in running a basic code in python 3.3.0 that includes HTML file Satabdi Mukherjee Python 1 04-04-2013 07:48 PM
How can I skip debugging Ajax when debugging my code? AAaron123 ASP .Net 3 07-28-2009 04:07 PM
debugging program that uses ctypes marco_347@yahoo.it Python 2 09-09-2007 06:21 AM
Debugging C vs debugging C++ jacob navia C Programming 11 10-27-2006 07:19 PM
No Debugging of C# Server-Side Script, but Code-Behind Debugging Works Johann Blake ASP .Net 1 01-05-2004 03:01 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57