home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #26 / NN_1992_26.iso / spool / comp / sys / next / software / 2526 < prev    next >
Encoding:
Internet Message Format  |  1992-11-07  |  1.8 KB

  1. Path: sparky!uunet!cis.ohio-state.edu!zaphod.mps.ohio-state.edu!cs.utexas.edu!natinst.com!news.dell.com!dellunix!uudell!pensoft!usenet
  2. From: ricardo@chuy (Ricardo Parada)
  3. Newsgroups: comp.sys.next.software
  4. Subject: Re: a question on gdb on NeXT
  5. Message-ID: <1992Nov5.162427.3619@pencom.com>
  6. Date: 5 Nov 92 16:24:27 GMT
  7. References: <1992Nov3.205612.12989@parsifal.umkc.edu>
  8. Sender: usenet@pencom.com (Usenet Pseudo User)
  9. Organization: Pencom Software
  10. Lines: 53
  11.  
  12. In article <1992Nov3.205612.12989@parsifal.umkc.edu> dmedhi@.cstp.umkc.edu  
  13. writes:
  14. > "file source.c" in DBX (in dec, sun, ...) activates source
  15. > file  source.c where upon you can put breakpoint using stop etc for 
  16. > debugging. Is there an equivalent command in gdb on NeXT? I have tried
  17. > file, edit, view without any success.  Do I need to set something
  18. > somewhere?
  19. > Another observation I have made is that once I am inside gdb and do 
  20. > listing, I get 
  21. >    (gdb) list
  22. >       crt0.s: No such file or directory.
  23. >       However, if once I invoke gdb and do (right away) run, and list 
  24. >       afterward as shown below:
  25. >    (gdb) run
  26. >       ...
  27. >       ...
  28. >       Program exited normally.
  29. >    (gdb) list
  30. >       #include <stdio.h>
  31. >       ...
  32. >       ...
  33. > then it gives listing and the source file happens to be the 
  34. > first source file in my makefile. Any clue what's going on?
  35. > (BTW, I am using NS 2.1)
  36. > Thanks.
  37. > Deep Medhi
  38. > dmedhi@aazoli.cstp.umkc.edu (NeXTmail okay)
  39.  
  40. Try setting a breakpoint at main() and then run the program.  For example:
  41.    (gdb) b main
  42.    (gdb) r
  43.    stopped at main: ... blah, blah!
  44.    (gdb) l
  45.     1: #include <stdio.h>
  46.     2: void main()
  47.     3: {
  48.          ...
  49.    10:
  50.    (gdb) _
  51.  
  52. That normally works for me, even under 2.1.  Hope it helps!
  53.  
  54. --
  55. + Ricardo J. Parada
  56.