Source horribly out-of-sync during debugging
Source horribly out-of-sync during debugging
- Subject: Source horribly out-of-sync during debugging
- From: Brendan Dixon <email@hidden>
- Date: Tue, 29 Mar 2005 17:44:26 -0800
Title: Source horribly out-of-sync during debugging
I am a relatively new user of GCC and GDB, though I’ve used many, many other compilers and debuggers over the years – including some very low-level ones. I’ve run into a problem, which is likely caused by my build (I suppose), that I’ve not yet been able to figure out: When I debug a static-library I’ve built using GDB, the source lines – including the referenced files – are horribly out of sync. For example, I will *known* that I’m in, say, A.CPP, but GDB reports me being at some odd line in B.CPP.
The static library is built using pretty normal, as far as I can tell, GCC options: -ggdb3 –O0 –Wall –frepo. The library is designed as part of an Apache module I’m writing, but I’ve seen the same effect when linking/debugging it within a small test harness. The code is relatively clean ISO C++. It does have a few inline functions (mostly quick checks) and uses a couple of templates (the auto_ptr and basic_string from the STL and a modified form of auto_ptr I use for items not allocated through new). Other than that, it’s straightforward code. It does link in the Apache Portable Runtime and LibXML2/XSLT, but I (more or less) treat those as black-boxes.
I’m building on Mac OS X 10.3 (the latest Panther build) using the GCC and GDB provided by Apple (GCC 3.3 and GDB 5.3). I tend to build my project outside of XCode, since I need to (eventually) port to other platforms, but like using the XCode wrapper around GDB. (I often debug Apache by limiting it to a single process and using a non-standard HTTP port.)
I welcome any thoughts and suggestions.
Thank you,
Brendan
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden