gdb
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Gdb] Source horribly out-of-sync


From: Brendan Dixon
Subject: [Gdb] Source horribly out-of-sync
Date: Tue, 29 Mar 2005 17:31:43 -0800
User-agent: Microsoft-Entourage/11.1.0.040913

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 welcome any thoughts and suggestions. I do not subscribe to this list and so would appreciate being cc’d on any responses.

Thank you,
Brendan

reply via email to

[Prev in Thread] Current Thread [Next in Thread]