You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@openoffice.apache.org by jorge ivan poot diaz <iv...@gmail.com> on 2013/04/11 04:12:18 UTC
tpcolor - aName
Hello,
I am modifying this code into the source code AOO
http://opengrok.adfinis-sygroup.org/source/xref/aoo-trunk/main/cui/source/tabpages/tpcolor.cxx#465
I want to know how I can see the value of variables or just know that you
value.
For example this code fragment:
ConvertColorValues (aAktuellColor, CM_RGB);
pEntry = new XColorEntry( aAktuellColor, aName );
aName = ??
I think this is the name of the color that is added, I'm not sure. Help me.
Regards.
Re: tpcolor - aName
Posted by Ariel Constenla-Haile <ar...@apache.org>.
Hi Ivan,
On Fri, Apr 12, 2013 at 08:32:06PM -0500, jorge ivan poot diaz wrote:
> > Do you want to see the value of this variable inside the debugger (gdb)?
> Yes . How I can do this?
As long as the strings are objects, you need a pretty-printer. You can
use dbg_dump():
(gdb) break SvxColorTabPage::ClickAddHdl_Impl
Breakpoint 1 at 0x7fca09794d8e: file /build/aoo/src/trunk/main/cui/source/tabpages/tpcolor.cxx, line 467.
(gdb) c
Continuing.
Breakpoint 1, SvxColorTabPage::ClickAddHdl_Impl (this=0x29ed358) at /build/aoo/src/trunk/main/cui/source/tabpages/tpcolor.cxx:467
467 Window *pWindow = this;
(gdb) n
(gdb)
476 String aDesc( ResId( RID_SVXSTR_DESC_COLOR, rMgr ) );
(gdb)
477 String aName( aEdtName.GetText() );
(gdb)
479 long nCount = pColorTab->Count();
(gdb) print aDesc
$1 = {mpData = 0x2a204b0}
(gdb) print aName
$2 = {mpData = 0x2a16610}
(gdb) print dbg_dump(aDesc)
$3 = (const sal_Char *) 0x2968db8 "Please enter a name for the new
color:"
(gdb) print dbg_dump(aName)
$4 = (const sal_Char *) 0x2a3bd68 "Blue 9"
You can also create your gdb pretty-printers, as explained here:
http://sourceware.org/gdb/onlinedocs/gdb/Pretty-Printing.html
https://access.redhat.com/site/documentation/en-US/Red_Hat_Enterprise_Linux/6/html/Developer_Guide/debuggingprettyprinters.html
You may find some examples in /usr/share/gdb/auto-load/ if you installed
a debug package.
Regards
--
Ariel Constenla-Haile
La Plata, Argentina
Re: tpcolor - aName
Posted by jorge ivan poot diaz <iv...@gmail.com>.
> Do you want to see the value of this variable inside the debugger (gdb)?
Yes . How I can do this?
2013/4/11 Ariel Constenla-Haile <ar...@apache.org>
> Hi Jorge,
>
> On Wed, Apr 10, 2013 at 09:12:18PM -0500, jorge ivan poot diaz wrote:
> > Hello,
> > I am modifying this code into the source code AOO
> >
> >
> http://opengrok.adfinis-sygroup.org/source/xref/aoo-trunk/main/cui/source/tabpages/tpcolor.cxx#465
> >
> > I want to know how I can see the value of variables or just know that you
> > value.
>
> Do you want to see the value of this variable inside the debugger (gdb)?
>
>
> Regards
> --
> Ariel Constenla-Haile
> La Plata, Argentina
>
Re: tpcolor - aName
Posted by Ariel Constenla-Haile <ar...@apache.org>.
Hi Jorge,
On Wed, Apr 10, 2013 at 09:12:18PM -0500, jorge ivan poot diaz wrote:
> Hello,
> I am modifying this code into the source code AOO
>
> http://opengrok.adfinis-sygroup.org/source/xref/aoo-trunk/main/cui/source/tabpages/tpcolor.cxx#465
>
> I want to know how I can see the value of variables or just know that you
> value.
Do you want to see the value of this variable inside the debugger (gdb)?
Regards
--
Ariel Constenla-Haile
La Plata, Argentina