On Tue, 26 Aug 2003, Ken Schweigert wrote:
>
> Since I'm quite sure I can get this to reproduce, I'll volunteer to step through
> with the debugger.  However, I must admit that my debugging skills are very
> limited.  I can compile stuff just fine, just never needed to debug anything
> before.  If you'd be willing to walk me through this, and let me know what you
> need to see, I'll do it.  I've already compiled Analog with -g so there should
> be debugging information ready.
>
> If you don't have time, maybe you can point me to a good gdb tutorial and tell
> me what you need from it.
>

Thanks for your offer, Ken.

gdb is pretty simple. I think the only commands you need regularly are:
  r args  Run the program, with specified commandline args.
  s  Go to next line, including stepping into functions
  n  Go to next line, jumping over functions
  b file.c:nnn  Put a breakpoint at line nnn of file.c
  c  Continue running to next breakpoint
  p expr  Print the value of an expression
I've probably forgotten one, but that should get you started.

I guess for this problem, you'd need to put a breakpoint immediately after
the call to gethostbyaddr() in alias.c, and see what tempp contains. And if
tempp is NULL, h_errno will contain an indication of the error (see man
gethostbyaddr). Oh, you'll have to declare h_errno by putting
  extern int h_errno;
at the top of the dnsresolve() function.

Did any of that make sense?

-- 
Stephen Turner, Cambridge, UK    http://homepage.ntlworld.com/adelie/stephen/
 "The question of whether a computer can think is no more interesting than
  the question of whether a submarine can swim."  (Edsger W. Dijkstra)

+------------------------------------------------------------------------
|  TO UNSUBSCRIBE from this list:
|    http://lists.isite.net/listgate/analog-help/unsubscribe.html
|
|  Digest version: http://lists.isite.net/listgate/analog-help-digest/
|  Usenet version: news://news.gmane.org/gmane.comp.web.analog.general
|  List archives:  http://www.analog.cx/docs/mailing.html#listarchives
+------------------------------------------------------------------------

Reply via email to