dbx: no executable code at line

We I try and set a breakpoint on a line in dbx I get an error that there is no executable code at that line.

I can set a breakpoint for a function but not on a specific line.

This happens in Sun Studio 10 and 11. I do not get the error in Sun Studio 7.

I have searched the net and this forum and have not got too far.

I have recompiled all code with -g and also -xdebugformat=stabs

The executables and objects are not being moved.

I compile from within a ClearCase View and start sunstudio from within the view.

Does anyone have this same problem? Have you solved it?

Thank you,

-Brian

[649 byte] By [bmaguire36] at [2007-11-26 10:17:09]
# 1
Can you set breakpoints at other places in the same source file?Can you post the source code, or an example that shows the same problem?--chris
ChrisQuenelle at 2007-7-7 2:11:35 > top of Java-index,Development Tools,Solaris and Linux Development Tools...
# 2
It is possible that the source code you look at when setting a breakpoint is not the same that was used to compile object file. If you're debugging from IDE, where does breakpoint in function appear? Same line you were trying to set breakpoint at? Same source file?
MaximKartashev at 2007-7-7 2:11:35 > top of Java-index,Development Tools,Solaris and Linux Development Tools...
# 3

I have the similar questions:

when I tried to run the problem in dbx, I get the following message:

=============================

Running: a.out

(process id 19749)

Reading libCrun.so.1

dbx: warning: multiple bss segments in load object

dbx: warning: cannot demangle '__1fH__CimplNex_unexpected6F_v1AIex_catch2T6M_v_'

dbx: internal error: no variant information available

z = 5053.14160

execution completed, exit code is 0

==============================

when I tried to set some breakpoint, for example:

==============================

stop at 11

==============================

it gives me error:

==============================

dbx: no executable code at line "dbxc.cpp":11

==============================

My source code is:

===============================

#include <stdio.h>

void prin(double);

int main(void)

{

int i=0;

float x, y, z;

x = 3;

y = 2*x;

for (i = 0; i < 10; i++) {

x += 4*i ;

y /= 7 * i + 1;

}

z = x *y;

prin(z);

return 0;

}

void prin(double z)

{

printf("z = %8.5f\n", z);

}

====================================

I used the following command to compile:

=========================

CC -g dbxc.cpp

==========================

Your help is appreciated.

adiu@sun at 2007-7-7 2:11:35 > top of Java-index,Development Tools,Solaris and Linux Development Tools...
# 4
You haven't specified dbx version and the platform. The code you've provided debugs well on my machine (Solaris 10 x86, dbx 7.5).
MaximKartashev at 2007-7-7 2:11:35 > top of Java-index,Development Tools,Solaris and Linux Development Tools...