home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #31 / NN_1992_31.iso / spool / comp / unix / aix / 12803 < prev    next >
Encoding:
Internet Message Format  |  1992-12-23  |  2.5 KB

  1. Path: sparky!uunet!elroy.jpl.nasa.gov!nntp-server.caltech.edu!cithe502.cithep.caltech.edu!walter
  2. From: walter@cithe501.cithep.caltech.edu (Chris Walter)
  3. Newsgroups: comp.unix.aix
  4. Subject: Problem debugging g++ compiled code with gdb.
  5. Date: 23 Dec 1992 06:55:58 GMT
  6. Organization: California Institute of Technology, Pasadena
  7. Lines: 51
  8. Distribution: world
  9. Message-ID: <1h92huINNsio@gap.caltech.edu>
  10. NNTP-Posting-Host: cithe502.cithep.caltech.edu
  11. Originator: walter@cithe502.cithep.caltech.edu
  12.  
  13. Hi Folks,
  14.  
  15. First off I am running AIX3.2 on an RS6000.
  16.  
  17. I recently started programming in C++ so I got and installed
  18. g++/libg++.(gcc 2.3.2/libg++ 2.3).  Everything seems to be working
  19. fine.  Of course I soon wanted to debug my programs....  So I went and
  20. got gdb 4.7.  Everything in the make went fine and there were no complaints
  21. during the procedure.
  22.  
  23. gdb seems to work OK on small C programs compiled with gcc but I am
  24. having problems debugging C++ code compiled(-g of course) with g++.
  25.  
  26. Here is an example of what happens when I try to load a executable:
  27. ------------------------------------------------------------------------
  28. cithe502:wfd > gdb
  29. GDB is free software and you are welcome to distribute copies of it
  30.  under certain conditions; type "show copying" to see the conditions.
  31. There is absolutely no warranty for GDB; type "show warranty" for details.
  32. GDB 4.7, Copyright 1992 Free Software Foundation, Inc.
  33. (gdb) file monte
  34. Reading symbols from monte...GDB Error: `.bf' not found.
  35. GDB Error: `.bf' not found.
  36. done.
  37. (gdb)
  38. ------------------------------------------------------------------------
  39.  
  40. And here is the same thing for what I thought was a simpler program:
  41.  
  42. ------------------------------------------------------------------------
  43. cithe502:flux > gdb
  44. GDB is free software and you are welcome to distribute copies of it
  45.  under certain conditions; type "show copying" to see the conditions.
  46. There is absolutely no warranty for GDB; type "show warranty" for details.
  47. GDB 4.7, Copyright 1992 Free Software Foundation, Inc.
  48. (gdb) file flux
  49. Reading symbols from flux...GDB Error: `.bf' not found.
  50. GDB Error: `.bf' not found.
  51.  
  52. Catastrophe in realloc: invalid storage ptr
  53. IOT trap (core dumped)
  54. cithe502:flux > 
  55. ------------------------------------------------------------------------
  56.  
  57. In addition, the first program, which it allows me to load, starts in the
  58. middle of the routine if I tell it to "break main".  It sets the
  59. breakpoint something like halfway down the routine.
  60.  
  61. Any suggestions happily accepted!
  62.  
  63. -Chris Walter
  64.