Re: Mac OS X: Most comfortable way to debug OOo on OS X?

"eric.bachard" <[email protected]>
Newsgroups gmane.comp.openoffice.devel.porting
Message-ID <[email protected]>
Hi,

Tino Rachui - Sun Germany - Development - Software Engineer a écrit :
> Hi,
> 
> now that I built OOo successfully on Mac OS X I would like to debug it
> a little bit.

Congratulations !

  As an Ex-Windows developer I wonder what is the most
> comfortable way to do so. Using gdb directly is possible but cumbersome.

I'm not sure Graphic Tools are the best choice. For example, I sometimes 
use gdb but it's not really easy to use it without the good build 
option, and sometimes it don't work as expected... If you obtain a 
repeatable crash, you can begin with :

1) console + crash reporter, very important -> you'll find the logs in 
~/Library/Logs and ~/Library/Logs/CrashReporter

2) ktrace + kdump to obtain some infos.  Often helpfull

FYI : I recently found with just ktrace+kdump that libcoreaudio was one 
of the causes of the non usability of OOo1.1.4 build/working on Panther, 
but not on Tiger. In fact, they're at least 3 libraries who cause 
problems...

3) Command line tools :

Of course gcc -v  while build is helpfull (for just a module, else, 
you'll loose your eyes :-)  )

malloc_history
nm, objdump  (I use often these two )
otool  (like ldd on Linux)
heap (memory use),
gprof

shark (in command line) -> don't know, never used...


When you have an idea of what causes the problem, you can just rebuild 
the module you want to test with debug symbols enabled and test with gdb.

One time, I have build with --enable-debug, and after 2~3 days of build, 
I have obtained an unusable build, because too big  : 17 Go with some 
libs biggest than 750Mo !  ->  /dev/null
Second reason why it's a bad idea : the size + and the new introduced 
bugs...

Other way, I have seen something about linkoo just some days ago (a cws 
about this has been recently integrated)

> Is it even possible to use the Xcode front end to gdb and if yes how or
> what else do the Mac experts on this list suggest?

In fact, I prefer from far a term + command line, but right, some Apple 
tools are very efficient. ...sorry, I never use them :-)


Regards,
eric bachard



-- 
eric bachard <[email protected]>
Francophone OpenOffice.org Commmunity developer (Linux PPC /  Mac OS X / 
X11)
See : <http://fr.openoffice.org>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.