Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: Joshua Kramer <josh@globalherald.net>
To: gdb@sourceware.org
Subject: GDB Hopelessly broken (CentOS 5.2, debugging Apache QPid)
Date: Sat, 18 Apr 2009 05:19:00 -0000	[thread overview]
Message-ID: <49E949EC.5020700@globalherald.net> (raw)

Hello Everyone,

I'm having some really bizarre problems debugging Apache Qpid under 
CentOS 5.2, and I'm wondering if anyone can shed some light on this.  
The application is compiled with -ggdb and no optimization (the -O2 
specified in the makefile was removed).

GDB (as supplied by the OS) is exhibiting odd behavior.  First, I keep 
getting the error about the source files being newer than the 
executable, even though:

1. I have manually deleted all object files and executables, then ran 
make, and
2. I verified that the executable is 30 minutes newer than any source file.

Next, it appears that some code does not get compiled.  If I set a 
breakpoint on line 335 of a certain file, it does not stop until line 
339.  Also, some variables do not get declared.  In the code example 
shown below, the seContext variable is never declared - that is, if I 
set the breakpoint on lines directly after I assign something to that 
variable, when gdb stops and I enter the command 'print seContext', gdb 
replies that there is no seContext in this scope.

Are these things a result of unseen compiler optimizations?  Any help is 
greatly appreciated.

Thanks!
-Joshua Kramer

(gdb) list 
/home/josh/dev/qpid/trunk/qpid/cpp/src/qpid/broker/SessionAdapter.cpp:325
320
321     void SessionAdapter::QueueHandlerImpl::declare(const string& 
name, const string& alternateExchange,
322                                                    bool passive, 
bool durable, bool exclusive,
323                                                    bool autoDelete, 
const qpid::framing::FieldTable& arguments)
324     {
325         AclModule* acl = getBroker().getAcl();
326        
327         std::string seContext;
328         //if (arguments.isSet("secontext"))
329         {

(gdb) list 
/home/josh/dev/qpid/trunk/qpid/cpp/src/qpid/broker/SessionAdapter.cpp:343
338             params.insert(make_pair(acl::PROP_EXCLUSIVE, 
std::string(exclusive ? "true" : "false")));
339             params.insert(make_pair(acl::PROP_AUTODELETE, 
std::string(autoDelete ? "true" : "false")));
340            
341             // JPK: Create some parameters from the arguments.
342            
343             //if (arguments.isSet("secontext"))
344                 {
345                     seContext = arguments.getAsString("secontext");
346                     params.insert(make_pair(acl::PROP_SECONTEXT, 
seContext));
347                 }
(gdb)


             reply	other threads:[~2009-04-18  3:33 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-04-18  5:19 Joshua Kramer [this message]
2009-04-18  7:56 ` Paul Pluzhnikov
2009-04-18 12:43 ` Jan Kratochvil

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=49E949EC.5020700@globalherald.net \
    --to=josh@globalherald.net \
    --cc=gdb@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox