gwyn@brl-smoke.UUCP (03/31/86)
In article <424@chinet.UUCP> djc@chinet.UUCP (David J. Carpenter) writes: >I have been using the sdb debugger on some software that I have been >developing, and one day a problem appeared and has stayed ever since. I cannot >set a breakpoint and then run the program. Here's what I get: >--> r arg >Cannot set breakpoint: main:1 @ -2139094762 >[and then the program runs without stopping at main...] Usually this means that your executable file is "shared text" (ld -n option); the assumption is that changing the text would cause trouble for somebody else who happens to be trying to run it at the same time. There is no reason things have to be this way, and as I recall the Eighth Edition fixed this.
djc@chinet.UUCP (David J. Carpenter) (04/02/86)
I have been using the sdb debugger on some software that I have been developing, and one day a problem appeared and has stayed ever since. I cannot set a breakpoint and then run the program. Here's what I get: --> sdb /usr/local/bin/prog [source in current dir] No core image. * --> main:b [or any breakpoint...] 0x80800116 (main:26+2) b * --> r arg Cannot set breakpoint: main:1 @ -2139094762 [and then the program runs without stopping at main...] Anyone know what is going wrong here? Thanks... -- ...!ihnp4!ttrdc!exp747!qpsn!david David Carpenter [home] (312) 545-8076 [work] (312) 787-9343
dc@datlog.co.uk ( David Crone ) (04/02/86)
In article <424@chinet.UUCP> djc@chinet.UUCP (David J. Carpenter) writes: >I have been using the sdb debugger on some software that I have been >developing, and one day a problem appeared and has stayed ever since. I cannot >set a breakpoint and then run the program. Here's what I get: > >--> sdb /usr/local/bin/prog [source in current dir] >No core image. >* >--> main:b [or any breakpoint...] >0x80800116 (main:26+2) b >* >--> r arg >Cannot set breakpoint: main:1 @ -2139094762 >[and then the program runs without stopping at main...] > > >Anyone know what is going wrong here? Thanks... >-- > ...!ihnp4!ttrdc!exp747!qpsn!david > David Carpenter > [home] (312) 545-8076 > [work] (312) 787-9343 A similar thing happens using 'adb' and the cause is that the program that is being debugged is already being run by someone else. As the default link option is to share process text then the debugger shares the text segment of the already running process. Because of this the debugger won't set your breakpoint and hence doesn't stop at main. Two ways round this: i) Link the required process as non-shared text. or ii) Make your own copy of the process (different name) and debug that. (caveat: This has happened to me on a number of machines, however I have no direct experience of using a 3b2, so minimum flames please) Hope this helps, David Crone