Debugging Konqueror in KDevelop

David Joham djoham at criadvantage.com
Thu May 3 00:19:59 BST 2001


Hello all,

I'm hoping someone here can help me out. I'm a relative newbie to KDevelop
and I must be missing something simple. Here's what I'm trying to do:

I'm trying to fix a bug in Konqueror's javascript engine. I've downloaded
the 2.1.1 source to both Konqueror (KDEBase/konqueror) and the javascript
library (KDELibs/khtml/ecma) and compiled them using the standard
./configure and make. The shared object that I'm interested in (kjs_html.so)
is located in /usr/lib, at least on Mandrake 8. I made a backup copy of that
lib and kjs_html.la and then made a symlink to the new files that I just
created.

Thinking I would start with something simple, I just decided to change the
return value Konqueror gives when you ask it what browser it is using
navigator.appName. I changed kss_navigator.cpp from:

//kdDebug() << "appName -> Konqueror" << endl;
return String("Konqueror");

to

//kdDebug() << "appName -> Konqueror" << endl;
return String("Hello World");

This was rather simple and after a make, Konqueror returned "Hello World"
when I asked it who it was.

The next step I wanted to take was to ensure that I could use the debugging
capabilities within KDevelop, which is the reason I wanted to use KDevelop
in the first place. I imported the KDELibs/khtml/ecma files into KDevelop
using the project import feature. This seemed to work fine. I decided to
make sure I could make changes from within the KDevelop environment so I
changed the return value again and did another make. This worked fine also.
Then I decided
to try debugging and ran into trouble...

When I just hit the debug button, I get the following message:

gdb message:
./ecma: no such file or directory

Hmmmmm........

Then I tried to run Konqueror and attach what I was doing to that process. I
made sure I attached to the correct process, but all that did was crash
Konqi, both
before and after Konqi had used any javascript.

Hmmmm...... :)

I searched through the Project->Options and found the binary section. By
default, it said "./ecma". I changed it to konqueror and saved. When I tried
to debug this time I got the following message:

gdb message:
(gdb) (gdb) ./konqueror: no such file or directory

I went back into Project->Options binary section and found that my
"konqueror" had been replaced with "./konqueror". I decided to play along
and create a symlink in the ecma directory to konqueror. This time, when I
tried to debug, konqueror launched, but the breakpoint that I had set was
not respected. I did notice that when I started the debugging process, I got
the following status messages:

no symbol table loaded, use the "file" command
(no debugging symbols found) ...

Further exploring Project->Options, I found the compiler options section
that would seem to allow me to tell the compiler to insert debugging
symbols. However, this entire tab (along with the compiler warnings and
linker options) is completely disabled and I can't figure out how to enable
them.

At this point, I decided to do a sanity check and create a simple "Hello
World" application using the KDevelop project wizard and see if I could
debug that. I was able to debug this application fine. ARRRG!!!

At this point, I'm totally confused as to what I need to do to get this to
work. If I can get debugging to work in the simple case of kjs_html.cpp, I
could probably dive into the code I really want to debug without too many
problems. I know I'm just missing something fundamental.

Would someone be so kind as to provide me a simple step by step process of
how I can get debugging in this situation to work? I have looked into the
documentation, but I haven't found much help there. Most of the
documentation assumes that you are starting from scratch with your own
project, which doesn't help me.

Thanks in advance!

David

PS: sorry for the long and convoluted description of the problem. Since my
areas of expertise lie in Delphi, Java and javascript, I'm assuming my
newness to KDevelop and C++ will stick out like a sore thumb. With that, I
didn't want to give the impression that I'm just begging for help because
I'm a clueless newbie and it didn't work the first time. I wanted to make
sure everyone realized I had really tried :)

PSS: Sorry if this gets sent in HTML format. I've told it not to, but the
mailer doesn't always listen to me :(

-
to unsubscribe from this list send an email to kdevelop-request at kdevelop.org with the following body:
unsubscribe »your-email-address«



More information about the KDevelop mailing list