Strange debug behavior with 4.4.3
Steve Teale
steve.teale@britseyeview.com
Wed Mar 3 10:47:00 GMT 2010
I just built 4.4.3 - very simply
mkdir obdir
cd objdir
../configure --enable-languages=c,c++
make
make finished without errors, so then with a file foo.c
void foo()
{
}
I debug
steve@Ubuntu:~/gcc-4.4.3/objdir$ gdb --args gcc/cc1 ~/scratch/foo.c
GNU gdb (GDB) 7.0-ubuntu
...
This GDB was configured as "i486-linux-gnu".
...
Reading symbols from /home/steve/gcc-4.4.3/objdir/gcc/cc1...done.
(gdb) b gimplify.c:6249
Breakpoint 1 at 0x81a520c: file ../../gcc/gimplify.c, line 6249.
(gdb) run
Starting
program: /home/steve/gcc-4.4.3/objdir/gcc/cc1 /home/steve/scratch/foo.c
foo
Breakpoint 1, gimplify_expr (expr_p=0xb7f41758, pre_p=0xbffff1b8,
post_p=0x0,
gimple_test_f=0x819b000 <is_gimple_stmt>, fallback=fb_none)
at ../../gcc/gimplify.c:6249
6249 save_expr = *expr_p;
(gdb) n
6250 if (save_expr == NULL_TREE)
(gdb) n
6254 is_statement = gimple_test_f == is_gimple_stmt;
(gdb) n
6255 if (is_statement)
(gdb) n
6256 gcc_assert (pre_p);
(gdb) n
6259 if (gimple_test_f == is_gimple_reg)
(gdb) n
6261 else if (gimple_test_f == is_gimple_val
(gdb) n
6274 else if (gimple_test_f == is_gimple_min_lval
(gdb) n
6277 else if (gimple_test_f == is_gimple_addressable)
(gdb) n
6279 else if (gimple_test_f == is_gimple_stmt)
(gdb) n
6280 gcc_assert (fallback == fb_none);
(gdb) n
6293 if (pre_p == NULL)
(gdb) n
6296 if (post_p == NULL)
(gdb) n
6307 pre_last_gsi = gsi_last (*pre_p);
(gdb) n
6308 post_last_gsi = gsi_last (*post_p);
(gdb) n
6310 saved_location = input_location;
(gdb) n
6311 if (save_expr != error_mark_node
(gdb) n
6312 && EXPR_HAS_LOCATION (*expr_p))
(gdb) n
6311 if (save_expr != error_mark_node
(gdb) n
6313 input_location = EXPR_LOCATION (*expr_p);
(gdb) n
6729 post_p == &internal_post ? NULL : post_p,
Things go pear shaped after line 6312 - after that, next seems to get
you somewhere rather arbitrary.
I guess I'm doing something stupid - can anyone tell me what?
Thanks
Steve
More information about the Gcc-help
mailing list