glenne%hplsla@HP-SDE.SDE.HP.COM (Glenn Engel) (03/23/89)
I am forwarding this for harry. He says an earlier version of gdb did not exhibit the "problem". 1) After a breakpoint, one lists a function that exists in a different file from the function where the breakpoint occurred; Then a new breakpoint is set using a line number from the displayed listing. The result is a breakpoint at the line number in the file where the current breakpoint occurred, and NOT in the file where the listing was done, and where the breakpoint was expected. For example: | Reading symbol data from viper...done. | | Program received signal 5, SIGTRAP | breakpoint () (remcom.c line 668) | remcom.c: No such file or directory. | Type "help" for a list of commands. | (gdb) l test | 210 | 211 | 212 | 213 | 214 void test() | 215 { | 216 #define NUM_POLY 30 | 217 Point origin, p1, p2, p3, center, poly[NUM_POLY] ; | 218 Size sz ; | 219 int i, x, y, line, org_test; | (gdb) fo _hide | 536 ds_hide(junkPane2) ; | (gdb) b 536 | Breakpoint 1 at 0xc7648e: file remcom.c, line 536. <<####### wrong file! | (gdb) - | Glenn R. Engel | Hewlett-Packard | (206) 335-2066 | glenne%hplsla@hplabs.hp.com