home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #19 / NN_1992_19.iso / spool / gnu / gdb / bug / 1021 < prev    next >
Encoding:
Text File  |  1992-09-03  |  3.5 KB  |  85 lines

  1. Newsgroups: gnu.gdb.bug
  2. Path: sparky!uunet!cis.ohio-state.edu!chico.UUCP!ngiannio
  3. From: ngiannio@chico.UUCP (Nicholas Gianniotis)
  4. Subject: gdb 4.5 `bt' command intermittently fails on sparc-sun-sunos4.1 <repost>
  5. Message-ID: <9209030301.AA04256@chico.production.csfbp.com>
  6. Sender: gnulists@ai.mit.edu
  7. Organization: GNUs Not Usenet
  8. Distribution: gnu
  9. Date: Thu, 3 Sep 1992 03:01:54 GMT
  10. Approved: bug-gdb@prep.ai.mit.edu
  11. Lines: 72
  12.  
  13. I'm writing to report a problem I'm experiencing with gdb 4.5 running on a
  14. Sun SPARCstation 2, kernel architecture "sun4c", application architecture
  15. "sun4", under SunOS Release 4.1.1.
  16.  
  17. The compilers I used were the SunOS 4.1.1 bundled compiler (/usr/ucb/cc)
  18. and gcc 2.1. Both compilers produced binaries that exihibited the same
  19. problem. The programs were compiled with the "-g" option only, and to test
  20. this problem, were linked both statically (-Bstatic) as well as
  21. dynamically (-Bdynamic).  Both kinds of bindings exhibited the same
  22. problem.
  23.  
  24. Gdb is being run from within emacs version 18.58.1.
  25.  
  26. The problem is that with some programs, once they are started under gdb,
  27. gdb does not keep track of the call stack frames, so that a `bt' command
  28. will always report that you are in the topmost frame. For example, with
  29. the current project I am working on now (pfc), with a breakpoint at main:
  30.  
  31.     Breakpoint 1, main (argc=1, argv=0xf7fff4ec) at pfc.c:61
  32.     (gdb) bt
  33.     #0  main (argc=1, argv=0xf7fff4ec) at pfc.c:61
  34.     (gdb)
  35.  
  36. After I step into the first function, and try `bt' again, this is the
  37. result:
  38.  
  39.     (gdb) bt
  40.     #0  pfc_get_env_parm (type=3, name=0x5c072 "PFC_DEBUG",
  41.         default_value=0x5c07c "0", buffer=0x88a44, size=0) at pfc.c:344
  42.     (gdb)
  43.  
  44. When this routine returns to the topmost frame, I step into another
  45. function, with the same results:
  46.  
  47.     (gdb) bt
  48.     #0  pfc_setup_publishers (publisher_list=0x8ccd0) at pfc_publish.c:35
  49.     (gdb) 
  50.  
  51. Basically, no matter where I stop my program, every time I issue the `bt'
  52. command, gdb says that I am in the topmost frame (frame #0). Also, in some
  53. cases (not shown above), gdb fails to print the values of the function's
  54. parameters (it either shows empty parentheses () or question marks for the
  55. value "parm=???").
  56.  
  57. Finally, this behaviour is not exhibited with _every_ program I try to
  58. debug. A simple test-case program I wrote with several levels of function
  59. calls did not cause gdb to exhibit this problem. I have seen this problem
  60. with gdb infrequently in the past, but I'm not quite sure what causes it
  61. or what makes it go away. I'm not sure whether it's the program, the
  62. compiler or gdb; but an additional fact is that when I repeat the above
  63. experiment with dbx (which I avoid using at any cost) and the same
  64. executable, dbx successfully shows the call stack and the parameters at
  65. any point I care to stop at and look.
  66.  
  67. I am wondering if other people using a similar development environment
  68. have reported a similar condition, and if there is something I can do to
  69. fix it.
  70.  
  71. If you have never heard of this problem before, I can send you a copy of
  72. the program so you may try to reproduce it. But, since it is inconvenient
  73. to do this (there are half a dozen files involved), and there is also a
  74. chance you know what the problem is from my description, I'll refrain from
  75. sending any source with this note.
  76.  
  77. Thank you & best regards,
  78. Nick.
  79. --
  80.  Nicholas Gianniotis                              phone: +81 3 5251-1136
  81.  CS First Boston (Japan) Limited                  fax:   +81 3 3508-4427
  82.  Asahi Seimei Hibiya Building                     email: next8!nico@bmt.gun.com
  83.  5-1, Yurakucho 1-chome, Chiyoda-ku, Tokyo 100, Japan.
  84.  
  85.