Hi
Here is little problem gdb never does

I have a line in 'c' code like 

        10      int port;
        11      .
        12      .
        13      .
>>>>    14      x = htons(x);
        15      .
        16      .
        17
If I run this part of code on sun sparc with SunOs 5.7 
the htons is defined like 

#define htons(x) (x)

How do I break on line 14 and see what is happening ? It never breaks on
14, rather it does on 15. 
All statements (x) = (x) are ignored by gdb.For each such a case the
break point was set on next source statement. 
Is that gcc which optimizes the expressions like 'x=x' by removing from
the code.

Why so . In above case really I hppened to dig the header file why gdb
is not breaking on line: 14 

Why So ? can any one  explain 
Thanks 
Ranga Rao R

_______________________________________________
Bug-gdb mailing list
[EMAIL PROTECTED]
http://mail.gnu.org/mailman/listinfo/bug-gdb

Reply via email to