Free Downloads, Community Forum,
FAQs and Developer Resources


Make /Tools Your Home | Link to us

Today's posts | Posts since last visit | Most Active Topics

All Forums Register Login Search Subscriptions My Profile Inbox
Tool Warehouse FAQs Resources Help Member List Address Book Logout

Unable to get debug info from member variables

 
Logged in as: Guest
Users viewing this topic: none
  Printable Version
All Forums >> [SFU / Interix / SUA Technology] >> Interix Advanced Forum >> Unable to get debug info from member variables Page: [1]
Login
Message << Older Topic   Newer Topic >>
Unable to get debug info from member variables - Aug. 19, '04, 10:59:35 AM   
bvn

 

Posts: 15
Joined: Mar. 18, '04,
Status: offline
With the current version of gdb (the one shipped with SFU 3.5) I was unable to get debug info from member variables:

Breakpoint 2, _ZN7MTMatHe6mpLoadEPKc (this=<incomplete type>, cName=0x124f310 "F1") at /project35/Modelling/source/MT/MTServer/MT_MatHe.c:50
(gdb) print mvName
No symbol "mvName" in current context.
(gdb) print this->mvName
Attempt to extract a component of a value that is not a structure pointer.
(gdb) set language c++
Warning: the current language does not match this frame.
(gdb) print mvName
Internal error: `this' is not an aggregate
(gdb) print this->mvName
Internal error: `this' is not an aggregate


This seems to be happening with "const" parameters/member variables.
By passing the 'this' pointer to a local function the data can be retrieved. This is a workaroun that requires editing the code for each debug session. As we have lots of source code (around 500MB) an need to maintain it with only 4 people, it is almost impossible to modify all the code to include this workaround.

Is this behaviour known (as a bug)?

Some remarks of less importance:
As our C++ source file has a .c suffix the automatic language selection sees it as a C file.
Apparently name demangling of C++ functions is not properly done when listing stack. Selection of member functions for setting breakpoints works fine.
Also for a 'const int' function parameter we got an <incomplete type>
Post #: 1
RE: Unable to get debug info from member variables - Aug. 19, '04, 2:30:12 PM   
Rodney

 

Posts: 3714
Joined: Jul. 9, '02,
From: /Tools lab
Status: offline
> Is this behaviour known (as a bug)?

Yes.
As I understand it (and someone else can correct me if needed) that the effort
went to getting gdb working on C code. So there are shortcomings with
using gdb and C++ code. For debugging you can also use truss to
follow system calls.

(in reply to bvn)
Post #: 2
RE: Unable to get debug info from member variables - Aug. 20, '04, 4:22:38 AM   
bvn

 

Posts: 15
Joined: Mar. 18, '04,
Status: offline
Are there plans to improve the gdb to also work with C++ code ?

(in reply to Rodney)
Post #: 3
RE: Unable to get debug info from member variables - Aug. 10, '06, 10:26:16 AM   
asfoster

 

Posts: 36
Joined: Oct. 18, '05,
From: Lincolnshire UK
Status: offline
I know that this is some time later than the above postings - but I am having the same problem. Only my code is ALL C - no C++ to be seen.

I can see structs and their member data for code in the main code blocks in the app but anything in linked-in archive files (.a files) does not play ball.

This is a major blow. The majority of our code (in excess of 1 million lines) is in library file form (normally as shared-objects but gdb on Interix has real trouble getting to code in shared objects so I rebuild as .a to enable gdb to operate with them).

I have tried building the gdb 6.4 source but it bails out after about 5 minutes saying that it does not support the interix system.

Is there a fix to gdb on Interix that I can use?

Andy Foster

(in reply to bvn)
Post #: 4
RE: Unable to get debug info from member variables - Aug. 10, '06, 12:37:32 PM   
Rodney

 

Posts: 3714
Joined: Jul. 9, '02,
From: /Tools lab
Status: offline
I don't know if there is a plan or isn't plan.
Some of the Microsoft development group reads the messages here at
least occationally, but I don't know anymore than that.
If you have an MS rep assigned to your company you might get him/her
to try and ask as well. Getting the reps involved sometimes get results.

(in reply to asfoster)
Post #: 5
Page:   [1]
All Forums >> [SFU / Interix / SUA Technology] >> Interix Advanced Forum >> Unable to get debug info from member variables Page: [1]
Jump to:





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts


Search All Forums -

Advanced search


SPONSORS



Forum Software © ASPPlayground.NET Advanced Edition 2.5 ANSI

0.047