gm2
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Trying to track down problem with packed.com from testsuite


From: john o goyo
Subject: Re: Trying to track down problem with packed.com from testsuite
Date: Sun, 8 Sep 2024 12:57:28 -0400
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:102.0) Gecko/20100101 Thunderbird/102.11.0

Greetings, Gaius.

On 2024-09-02 09:00, Gaius Mulley wrote (in part):
john o goyo <jog37@riddermarkfarm.ca> writes (in part):

[...]
Here is what I tried:

[~/opt/gm2/testsuite]=> gm2-14 packed.mod -fiso -O2 -wrapper gdb,--args
GNU gdb (GDB) 15.1
[...]
This GDB was configured as "sparcv9-sun-solaris2.11".
[...]
Reading symbols from
/home/build/gcc/14.2.0/libexec/gcc/sparc-sun-solaris2.11/14.2.0/cc1gm2...
[...]
(gdb) break gimplify_function_tree(tree_node*)
Breakpoint 1 at 0x8a6f40: file
/home/build/opt/gcc/src/gcc-14.2.0/gcc/gimplify.cc, line 19333.
(gdb) r
Starting program:
/home/build/gcc/14.2.0/libexec/gcc/sparc-sun-solaris2.11/14.2.0/cc1gm2
-quiet -dumpdir a- -dumpbase packed.mod -dumpbase-ext .mod -mcpu=v9
-O2 -fiso -fm2-pathname=- -fm2-pathnameI. -fgen-module-list=-
-fscaffold-dynamic -fscaffold-main -flibs=m2iso,m2cor,m2pim,m2log
-fm2-pathname=- -fm2-pathnameI. packed.mod -o /var/tmp//ccb3aGgQ.s
[Thread debugging using libthread_db enabled]
[New Thread 1 (LWP 1)]
[Switching to Thread 1 (LWP 1)]

Thread 2 hit Breakpoint 1, gimplify_function_tree (fndecl=0xfb474700)
     at /home/build/opt/gcc/src/gcc-14.2.0/gcc/gimplify.cc:19333
19333   {
(gdb) l
19328      Return the sequence of GIMPLE statements corresponding to
the body
19329      of FNDECL.  */
19330
19331   void
19332   gimplify_function_tree (tree fndecl)
19333   {
19334     gimple_seq seq;
19335     gbind *bind;
19336
19337     gcc_assert (!gimple_body (fndecl));
[...]
I wonder what the output from the tree dump would be at this point?

(gdb) print debug_tree (fndecl)
(gdb) print debug_tree (fndecl)
 <function_decl fb474700 _M2_packed_init
    type <function_type fb432ae0
        type <void_type fb9109c0 PROC VOID
            align:8 warn_if_not_align:0 symtab:0 alias-set -1 canonical-type fb9109c0
            pointer_to_this <pointer_type fb910a20 ADDRESS>>
        SI
        size <integer_cst fb40abd0 constant 32>
        unit-size <integer_cst fb40abe8 constant 4>
        align:32 warn_if_not_align:0 symtab:0 alias-set -1 canonical-type fb432ae0
        arg-types <tree_list fb43dde8 value <integer_type fb9103c0 INTEGER>
            chain <tree_list fb43ddd0 value <pointer_type fb910a20 ADDRESS>
                chain <tree_list fb43ddb8 value <pointer_type fb910a20 ADDRESS>                     chain <tree_list fb40b050 value <void_type fb9109c0 PROC>>>>>
        pointer_to_this <pointer_type fb433f20>>
    addressable used public static SI (null):0:0 align:32 warn_if_not_align:0 context <translation_unit_decl fb4180d8 D.80> initial <block fb4240e0>
    result <result_decl fb4762d0 D.1631 type <void_type fb9109c0 PROC>
        VOID (null):0:0
        align:8 warn_if_not_align:0 context <function_decl fb474700 _M2_packed_init>>
    arguments <parm_decl fb473540 argc
        type <integer_type fb9103c0 INTEGER public SI size <integer_cst fb40abd0 32> unit-size <integer_cst fb40abe8 4>             align:32 warn_if_not_align:0 symtab:0 alias-set -1 canonical-type fb9103c0 precision:32 min <integer_cst fb40ae10 -2147483648> max <integer_cst fb40ae28 2147483647>             pointer_to_this <pointer_type fb910fc0> reference_to_this <reference_type fb452960>>         SI packed.mod:57:1 size <integer_cst fb40abd0 32> unit-size <integer_cst fb40abe8 4>         align:32 warn_if_not_align:0 context <function_decl fb474700 _M2_packed_init> arg-type <integer_type fb9103c0 INTEGER>
        chain <parm_decl fb4734f0 argv type <pointer_type fb910a20 ADDRESS>
            unsigned SI packed.mod:57:1 size <integer_cst fb40abd0 32> unit-size <integer_cst fb40abe8 4>             align:32 warn_if_not_align:0 context <function_decl fb474700 _M2_packed_init> arg-type <pointer_type fb910a20 ADDRESS> chain <parm_decl fb4734a0 envp>>>
    struct-function fb484000 chain <function_decl fb474680 _M2_packed_dep>>
$1 = void


[I cannot say that I am enlightened, though. #6-)]

or perhaps 'pf' might be able to get a m2 description of the tree:

(gdb) print pf (fndecl)

(gdb) print pf (fndecl)

Thread 2 received signal SIGSEGV, Segmentation fault.
0xf888bcf8 in putc () from /lib/libc.so.1
The program being debugged was signaled while in a function called from GDB.
GDB remains in the frame where the signal was received.
To change this behavior use "set unwind-on-signal on".
Evaluation of the expression containing the function
(modula2::pf(tree)) will be abandoned.
When the function is done executing, GDB will silently stop.

[I am in uncharted territory here, Gaius.]

Sincerely,
john

P.S. Configure did not honour the flags specified so I used variables CC="/home/build/gcc/14.2.0/bin/gcc -g -O0" and so on.  But this was still ignored building the libraries.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]