Hi Mike,

Le 18 févr. 07, à 01:55, Michael Sicotte a écrit :

Hi all,

I have followed the instructions at

http://wiki.services.openoffice.org/wiki/ MacOSX_Debug_OpenOffice.org_using_XCode

to debug OOo, but the

Debug Executable menu

is not enabled.  Any ideas?

Like you, I just started OO build weeks ago.
For XCode...i just gave up !
You must use gdb... (untill more information is available)
I just use XCode for code editing and browsing.

If you don't gdb, here is a quick tuto : (Thanks to Pavel and Eric !)

build vcl with debug, see (http://wiki.services.openoffice.org/wiki/AquaBuild#Creating_Debug- Versions_of_Modules) see also (http://wiki.services.openoffice.org/wiki/Debugging#Examining_strings)
(for example, i inserted those commands in salnativewidgets.cxx)


> cd <install dir>/Contents/program
> gdb --args ./soffice.bin -norestore - nofirststartwizard

gdb starts and wait for a command...
Here is a short list of commands i know and use :

> b salnativewidgets.cxx:462
this command will put a breakpoint inthe specified file, at the specified line number
gdb informs you that this breakpoint has number X

> delete X
delete breakpoint X

> run
start openoffice

>c
continue execution after a breakpoint

>n
next instruction (if it's a call to a function, don't go inside the function)

>s
next instruction (if it's a call to a function, go inside the function)

>p var_name
print value of variable

>p dbg_dump(string_var_name)
print value of an OUString or an OString
(it's the standard string type in OO ; but it's unicode, so 'p string_var_name' show only hex values)

>display <var name>
>display dbg_dump(string_var_name)
automatically print value of the var at each breakpoint
(very usefull inside loops !)

>bt
show the calling chain, from main() to the current breakpoint


You can do a CTRL C in gdb : it'll stop execution, as if a breakpoint was present at the current instruction


Hope this helps,
Michel Renon

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to