Author Topic: gdb tutorial / walkthru  (Read 7106 times)

greggman

  • Senior Community Member
  • Posts: 280
  • Hero Points: 14
gdb tutorial / walkthru
« on: November 06, 2006, 11:21:38 AM »
Is there a Slickedit as an interface to GDB tutorial and walk thru? Preferably covering remote debugging.

Going to the Slickedit help and searching for "gdb" brings up absolutely no information about actually using it or getting it work. Maybe I'm looking in the wrong place?

ps: I'm a gdb noob. I'm able to step through my code using gdb in our current environment by itself (no slickedit, just command line) but when I try to even get slickedit to start debugging I just get "Error starting debugger. GDB has terminated prematurely". I tried clicking on c:\program files\slickedit\win\gdb.exe just for laughs and I got an error about missing "cygwin1.dll"

hs2

  • Senior Community Member
  • Posts: 2761
  • Hero Points: 292
Re: gdb tutorial / walkthru
« Reply #1 on: November 06, 2006, 11:40:22 AM »
The next best source for help is this great forum ;)
Have a look here - you're not alone ...

http://community.slickedit.com/index.php?topic=458.0
http://community.slickedit.com/index.php?topic=185.msg680#msg680

Good luck,

HS2

hs2

  • Senior Community Member
  • Posts: 2761
  • Hero Points: 292
Re: gdb tutorial / walkthru
« Reply #2 on: November 06, 2006, 11:51:36 AM »
@greggman:
Also tried Help -> Search 'gdb' and got this hit 'Run and Debug'.
@see 'Slick Help -> Contents -> Run and Debug'

HS2

Dennis

  • Senior Community Member
  • Posts: 3955
  • Hero Points: 515
Re: gdb tutorial / walkthru
« Reply #3 on: November 06, 2006, 03:32:53 PM »
Remote debugging is hard.  I'll tell you the first steps, and ask you to look at "Run and Debug" for a thorough explanation of the rest.

The first step is to configure SlickEdit to use your GDB executable, especially if you are doing remote debugging, since presumably, your target is a different than what you are running locally.  To do this, go to "Debug > Debugger Options...", switch to the "GDB Configurations" tab, and click "Add..."

The second step (for remote debugging) is to go to "Debug > Attach > Attach to Remote Target using GDB", put in the IP address and port for your remote gdbserver (which you need to have ready and awaiting connection), make sure that you select the correct GDB configuration, and give it the local path to the executable to get symbolic debugging information from, and then you can connect.

Everybody's remote debugging environment is different, so that's about as far as I can help you now.

greggman

  • Senior Community Member
  • Posts: 280
  • Hero Points: 14
Re: gdb tutorial / walkthru
« Reply #4 on: November 06, 2006, 04:23:08 PM »
okay I'll give it a try. Thanks.

By the way, is there something wrong with my help? hs2 says he gets "Run and Debug" when searching for "gdb".  All I get are

Quote
dbg_create_new_session
dbg_session_test_version
debug_attach
debug_configurations
debug_remote
Debugger options
Debugger tool windows
def_debug_logging
def_debug_vsdebugio_port
def_gdb_proxy_port
def_gdb_use_proxy
Hex, octal, and binary view
SlickEdit Menus

"Run and Debug" doesn't appear and all those topics are relatively small and generic.

Lisa

  • Senior Community Member
  • Posts: 238
  • Hero Points: 24
  • User-friendly geek-speak translator extraordinaire
Re: gdb tutorial / walkthru
« Reply #5 on: November 06, 2006, 04:48:41 PM »
If you're using v11, in the Help go to Table of Contents. You will see Run and Debug is its own chapter in between "Build" and "Tutorial".

greggman

  • Senior Community Member
  • Posts: 280
  • Hero Points: 14
Re: gdb tutorial / walkthru
« Reply #6 on: November 06, 2006, 06:09:59 PM »
Thanks Lisa

I found it. That wasn't really my question though. My question is why does hs2 find "Run and Debug" when *searching* for "gdb" and I don't? Do we have different versions of help? Do I have a setting set wrong? If I had found that when searching for "gdb" maybe I wouldn't have had to ask on the forums for more help and so that has me wondering what other things could I be figuring out better if my help's search was working as good as hs2's appears to?

Lisa

  • Senior Community Member
  • Posts: 238
  • Hero Points: 24
  • User-friendly geek-speak translator extraordinaire
Re: gdb tutorial / walkthru
« Reply #7 on: November 06, 2006, 06:22:43 PM »
Ah sorry... hs2 has better help than I do, too. greggman, your help matches what is correct for v11, and the entries are the same in v10 also. Maybe hs2 can give us some insight?

In the meantime, I have added an index marker so that in v12, "gdb" will get you to the correct topic.

hs2

  • Senior Community Member
  • Posts: 2761
  • Hero Points: 292
Re: gdb tutorial / walkthru
« Reply #8 on: November 06, 2006, 10:48:27 PM »
I'm sorry ... the real hit was 'Debugger options' and after activating I got 'You are here: Run and Debug > Debugger options'.
The topic hint was correct, but the 1st part of my prev. post was wrong and therefore misleading :(
Next time I'll try to be more careful !

HS2