[Libreoffice] [MHST] GDB doesn't show name of methods in backtrace

Ta Duc Tung tatung2112 at gmail.com
Sat Jul 23 02:22:29 PDT 2011


On 07/22/2011 06:51 PM, Andor E wrote:
> Hi,
> did you build module sw with debug=t? Otherwise you won't get any
> method names and line numbers.
>
> Greetings
>
> eymux
>
> On Fri, Jul 22, 2011 at 12:57 PM, Ta Duc Tung<tatung2112 at gmail.com>  wrote:
>> Hi,
>> I've tried to add a radio button into print dialog for Writer.
>> In /sw/source/core/view/printdata.cxx, I have this piece of code (around
>> line 310)
>> http://pastebin.com/gMu70wYm
>> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>>     aChoices[3] = aLocalizedStrings.GetString( 30 );
>>     aChoicesDisabled[3] = sal_False;
>>     aHelpIds[3] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM(
>> ".HelpID:vcl:PrintDialog:PrintContent:RadioButton:3" ) );
>>     m_aUIProperties[nIdx++].Value = getChoiceControlOpt( rtl::OUString(),
>>                                                          aHelpIds,
>>                                                          aPrintRangeName,
>>                                                          aChoices,
>>                                                          0 /* always default
>> to 'All pages' */,
>>                                                          rtl::OUString(
>> RTL_CONSTASCII_USTRINGPARAM( "Radio" ) ),
>>                                                          aChoicesDisabled
>>                                                          );
>> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>>
>> After that I add an item to PRINTOPTUI in /sw/source/ui/config/optdlg.src
>> -->  the "Current Page"
>> http://pastebin.com/nrNBz7A6
>> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>> StringArray STR_PRINTOPTUI
>> {
>>     ItemList [en-US] =
>>     {
>>       ......
>> <  "~All pages";>;
>> <  "Pa~ges";>;
>> <  "~Selection";>;
>> <  "Cu~rrent page";>;
>>     };
>> };
>> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>>
>> When I try to run it, the radio button does appear but when I click on that
>> radio button (Current page), Writer just stop and dismiss.
>>
>> I've tried to debug it by gdb and this is the message.
>> http://pastebin.com/i4QpmjDS
>> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>> Program received signal SIGSEGV, Segmentation fault.
>> 0x0013391a in rtl_uString_acquire ()
>>    from
>> /home/tatung/mhstlibo/git/libo/solver/350/unxlngi6.pro/installation/opt/program/../basis-link/ure-link/lib/libuno_sal.so.3
>> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>>
>> I put breakpoint in SwXTextDocument::getRendererCount() (#5 in gdb log from
>> pastebin link above). The program does stop at that breakpoint, but when I
>> want to step in, it just pass through it :( Like this:
>> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>> Breakpoint 1, 0x04384774 in
>> SwXTextDocument::getRendererCount(com::sun::star::uno::Any const&,
>> com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue>  const&)
>> ()
>>    from
>> /home/tatung/mhstlibo/git/libo/solver/350/unxlngi6.pro/installation/opt/program/../basis-link/program/libswlo.so
>> (gdb) step
>> Single stepping until exit from function
>> _ZN15SwXTextDocument16getRendererCountERKN3com3sun4star3uno3AnyERKNS3_8SequenceINS2_5beans13PropertyValueEEE,
>> which has no line number information.
>> In unotxdoc.cxx/getRendererCount, after check IsValid()
>> In unotxdoc.cxx/getRendererCount 1
>> [New Thread 0xb1620b70 (LWP 14464)]
>> [Thread 0xb1620b70 (LWP 14464) exited]
>> [New Thread 0xb223fb70 (LWP 14465)]
>> In unotxdoc.cxx/getRendererCount 2
>> In unotxdoc.cxx/getRendererCount 3
>> In unotxdoc.cxx/getRendererCount 4
>> In unotxdoc.cxx/getRendererCount/check pSwView 1
>> [New Thread 0xb1620b70 (LWP 14466)]
>> [Thread 0xb223fb70 (LWP 14465) exited]
>> In unotxdoc.cxx/getRendererCount/check pSwView 2
>> In unotxdoc.cxx/getRendererCount/check pSwView 3
>>
>> Program received signal SIGSEGV, Segmentation fault.
>> 0x0013391a in rtl_uString_acquire ()
>>    from
>> /home/tatung/mhstlibo/git/libo/solver/350/unxlngi6.pro/installation/opt/program/../basis-link/ure-link/lib/libuno_sal.so.3
>> (gdb)
>> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>>
>> Did I miss any thing? Please help :)
>>
>> Thanks for your help!
>> Ta Tung
>>
>> _______________________________________________
>> LibreOffice mailing list
>> LibreOffice at lists.freedesktop.org
>> http://lists.freedesktop.org/mailman/listinfo/libreoffice
>>

Hi,

I've tried to make it with debug=t but no change. Still there that log

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
(gdb) backtrace
#0  0x0013391a in rtl_uString_acquire ()
    from 
/home/tatung/mhstlibo/git/libo/solver/350/unxlngi6.pro/installation/opt/program/../basis-link/ure-link/lib/libuno_sal.so.3
#1  0x010aee25 in String::Assign(String const&) ()
    from 
/home/tatung/mhstlibo/git/libo/solver/350/unxlngi6.pro/installation/opt/program/../basis-link/program/libtllo.so
#2  0x0427fac2 in ?? ()
    from 
/home/tatung/mhstlibo/git/libo/solver/350/unxlngi6.pro/installation/opt/program/../basis-link/program/libswlo.so
#3  0x043812f0 in ?? ()
    from 
/home/tatung/mhstlibo/git/libo/solver/350/unxlngi6.pro/installation/opt/program/../basis-link/program/libswlo.so
#4  0x0419ec9a in ?? ()
    from 
/home/tatung/mhstlibo/git/libo/solver/350/unxlngi6.pro/installation/opt/program/../basis-link/program/libswlo.so
#5  0x04384ee5 in 
SwXTextDocument::getRendererCount(com::sun::star::uno::Any const&, 
com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> 
const&) ()
    from 
/home/tatung/mhstlibo/git/libo/solver/350/unxlngi6.pro/installation/opt/program/../basis-link/program/libswlo.so
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

What should I do now?

Thank and Best Regards,
Ta Tung


More information about the LibreOffice mailing list