home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #30 / NN_1992_30.iso / spool / gnu / gdb / bug / 1309 < prev    next >
Encoding:
Text File  |  1992-12-12  |  2.6 KB  |  71 lines

  1. Newsgroups: gnu.gdb.bug
  2. Path: sparky!uunet!zaphod.mps.ohio-state.edu!cis.ohio-state.edu!trilogy.com!vaughan
  3. From: vaughan@trilogy.com (Paul Vaughan)
  4. Subject: 4.7 source more recent than executable problem
  5. Message-ID: <9212112357.AA12742@Trilogy.COM>
  6. Sender: gnulists@ai.mit.edu
  7. Organization: GNUs Not Usenet
  8. Distribution: gnu
  9. Date: Fri, 11 Dec 1992 23:57:12 GMT
  10. Approved: bug-gdb@prep.ai.mit.edu
  11. Lines: 58
  12.  
  13. This is gdb 4.7 on a Sun Sparc 2 (both host and target), SunOS 4.1,
  14. SUN CC compiled program under test, with help from cback version 2.05.
  15.  
  16. This has been a minor problem for a long time. If you edit the source
  17. and recompile, gdb reads in the symbols again as it should, but it
  18. doesn't change the executable. If it stops at a breakpoint, it will
  19. tell you "Source file is more recent than executable." If it doesn't
  20. stop at a breakpoint, it doesn't warn at all. I should think if it's
  21. not going to automatically do an exec when you restart with run, it
  22. ought to warn you before it does the run. However, I hoped that it
  23. would automatically do the exec before restarting the program.  Plus,
  24. the warning "Source file is more recent than executable."  is
  25. confusing in this case because the source file is not more recent than
  26. the executable file--it's more recent than gdb's image of the
  27. executable file, and that's what counts.
  28.  
  29. centipede% !C
  30. CC -g trash.cc -o trash
  31. cback version 2.05 - Copyright (c) 1992 NewCode Technology, Inc.
  32. centipede% gdb trash
  33. GDB is free software and you are welcome to distribute copies of it
  34.  under certain conditions; type "show copying" to see the conditions.
  35. There is absolutely no warranty for GDB; type "show warranty" for details.
  36. GDB 4.7, Copyright 1992 Free Software Foundation, Inc...
  37. (gdb) run
  38. Starting program: /usr2/vaughan2/trilogy/engine/src/trash 
  39.  
  40. Program exited with code 01.
  41. (gdb)                                     <-------------- stopped with ^Z
  42. Stopped
  43. centipede% touch trash.cc
  44. centipede% !C
  45. CC -g trash.cc -o trash
  46. cback version 2.05 - Copyright (c) 1992 NewCode Technology, Inc.
  47. centipede% fg
  48. gdb trash
  49. (gdb) run
  50. `/usr2/vaughan2/trilogy/engine/src/trash' has changed; re-reading symbols.
  51. Starting program: /usr2/vaughan2/trilogy/engine/src/trash 
  52.  
  53. Program exited with code 01.
  54. (gdb) break main
  55. Breakpoint 1 at 0x22b4: file trash.cc, line 14.
  56. (gdb) run
  57. Starting program: /usr2/vaughan2/trilogy/engine/src/trash 
  58.  
  59. Breakpoint 1, main () at trash.cc:14
  60. Source file is more recent than executable.
  61. 14    void main () { 
  62. (gdb) exec trash
  63. A program is being debugged already.  Kill it? (y or n) y
  64. (gdb) run
  65. Starting program: /usr2/vaughan2/trilogy/engine/src/trash 
  66.  
  67. Breakpoint 1, main () at trash.cc:14
  68. 14    void main () { 
  69.  
  70.  
  71.