You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@qpid.apache.org by Joshua Kramer <jo...@globalherald.net> on 2009/04/10 19:04:22 UTC
Bogus debug information?
Hello,
Has anyone run into a circumstance where gcc consistently generates bogus debug
information - or, ddd can't read a source file correctly?
I am debugging some additions I made to the ACL framework. There are two
problems I am having:
1. I overloaded the Acl::authorise method, and the method call is not
dispatching to the correct instance. Previously there were two instances
of Acl::authorise, and I overloaded each by creating a Framing::FieldTable
& argument directly before the last argument. It appears to still be
using the old methods even though the call I step out of clearly has the
FieldTable argument.
2. In two source files, the code execution does not follow what ddd shows
on-screen. ddd appears to be 3 lines behind what gdb indicates, and it
appears to jump around randomly at times.
I've modified the Makefiles to remove optimization and hard-code -ggdb for
CFLAGS and CXXFLAGS. The linker is not stripping debug info. What
other things should I consider?
On the attached files - the call to acl->authorise on SessionAdapter.cpp line
339 ought to be calling the Acl::authorise on line 102 of Acl.cpp.
Any ideas?
Cheers,
-Josh
--
-----
http://www.globalherald.net/jb01
GlobalHerald.NET, the Smarter Social Network! (tm)
Re: arguments vs. params (was Re: Bogus debug information?)
Posted by Carl Trieloff <cc...@redhat.com>.
Joshua Kramer wrote:
>
>> I am not sure why you need the arguments fieldtable.... It can be
>> added to the params for the fields that you want to match on. see how
>> I build them in
>
> Thank you Carl. I was under the impression that parameters passed via
> params were constrained to the valid parameters present in a
> particular AMQP spec... that's why I went with arguments instead.
> I'll take a look at unbind() and go from there.
>
Np, it is anything that we care about for ACL, so just extend the enums
as needed as that the be faster. That is why I did it that way.
regards
Carl.
---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project: http://qpid.apache.org
Use/Interact: mailto:dev-subscribe@qpid.apache.org
arguments vs. params (was Re: Bogus debug information?)
Posted by Joshua Kramer <jo...@globalherald.net>.
> I am not sure why you need the arguments fieldtable.... It can be added to
> the params for the fields that you want to match on. see how I build them in
Thank you Carl. I was under the impression that parameters passed via
params were constrained to the valid parameters present in a particular
AMQP spec... that's why I went with arguments instead. I'll take a look
at unbind() and go from there.
--
-----
http://www.globalherald.net/jb01
GlobalHerald.NET, the Smarter Social Network! (tm)
---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project: http://qpid.apache.org
Use/Interact: mailto:dev-subscribe@qpid.apache.org
Re: Bogus debug information?
Posted by Carl Trieloff <cc...@redhat.com>.
Joshua Kramer wrote:
>
> Hello,
>
> In order to solve this problem, I tried adjusting the order of
> parameters. Specifically, I put the 'const framing::FieldTable
> &arguments' as the first parameter to the authorise() methods.
>
> Still no dice - the function call is jumping to the incorrect authorise.
>
> What is the best way to pass the 'arguments' to the authorise methods?
> If needed I will consider modifying all calls to authorise, but I
> don't think that's the best way to go about this.
>
> Thanks,
> -Josh
>
> On Fri, 10 Apr 2009, Joshua Kramer wrote:
>
>> Date: Fri, 10 Apr 2009 13:04:22 -0400 (EDT)
>> From: Joshua Kramer <jo...@globalherald.net>
>> Reply-To: dev@qpid.apache.org
>> To: dev@qpid.apache.org
>> Subject: Bogus debug information?
>>
>>
>> Hello,
>>
>> Has anyone run into a circumstance where gcc consistently generates
>> bogus debug information - or, ddd can't read a source file correctly?
>>
>> I am debugging some additions I made to the ACL framework. There are
>> two problems I am having:
>>
>> 1. I overloaded the Acl::authorise method, and the method call is not
>> dispatching to the correct instance. Previously there were two
>> instances of Acl::authorise, and I overloaded each by creating a
>> Framing::FieldTable & argument directly before the last argument. It
>> appears to still be using the old methods even though the call I step
>> out of clearly has the FieldTable argument.
The fieldtable & the args use the same signature when the last param is
null, thus the in-ability to call your overloaded function.
I am not sure why you need the arguments fieldtable.... It can be added
to the params for the fields that you want to match on. see how I build
them in unbind(). If the param you want does not have a name then it
will need to be named in AclModule.h
regards
Carl.
---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project: http://qpid.apache.org
Use/Interact: mailto:dev-subscribe@qpid.apache.org
Re: Bogus debug information?
Posted by Joshua Kramer <jo...@globalherald.net>.
Hello,
In order to solve this problem, I tried adjusting the order of parameters.
Specifically, I put the 'const framing::FieldTable &arguments' as the
first parameter to the authorise() methods.
Still no dice - the function call is jumping to the incorrect authorise.
What is the best way to pass the 'arguments' to the authorise methods? If
needed I will consider modifying all calls to authorise, but I don't think
that's the best way to go about this.
Thanks,
-Josh
On Fri, 10 Apr 2009, Joshua Kramer wrote:
> Date: Fri, 10 Apr 2009 13:04:22 -0400 (EDT)
> From: Joshua Kramer <jo...@globalherald.net>
> Reply-To: dev@qpid.apache.org
> To: dev@qpid.apache.org
> Subject: Bogus debug information?
>
>
> Hello,
>
> Has anyone run into a circumstance where gcc consistently generates bogus
> debug information - or, ddd can't read a source file correctly?
>
> I am debugging some additions I made to the ACL framework. There are two
> problems I am having:
>
> 1. I overloaded the Acl::authorise method, and the method call is not
> dispatching to the correct instance. Previously there were two instances of
> Acl::authorise, and I overloaded each by creating a Framing::FieldTable &
> argument directly before the last argument. It appears to still be using the
> old methods even though the call I step out of clearly has the FieldTable
> argument.
>
> 2. In two source files, the code execution does not follow what ddd shows
> on-screen. ddd appears to be 3 lines behind what gdb indicates, and it
> appears to jump around randomly at times.
>
> I've modified the Makefiles to remove optimization and hard-code -ggdb for
> CFLAGS and CXXFLAGS. The linker is not stripping debug info. What other
> things should I consider?
>
> On the attached files - the call to acl->authorise on SessionAdapter.cpp line
> 339 ought to be calling the Acl::authorise on line 102 of Acl.cpp.
>
> Any ideas?
>
> Cheers,
> -Josh
>
>
--
-----
http://www.globalherald.net/jb01
GlobalHerald.NET, the Smarter Social Network! (tm)
---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project: http://qpid.apache.org
Use/Interact: mailto:dev-subscribe@qpid.apache.org