[PATCH] Fix gdb.ada/O2_float_param.exp for PowerPC

Tom Tromey tom@tromey.com
Fri Aug 4 16:05:34 GMT 2023


>>>>> "Carl" == Carl Love via Gdb-patches <gdb-patches@sourceware.org> writes:

Carl> Fix gdb.ada/O2_float_param.exp for PowerPC

Carl> The frame command on Power pc prints the address in hex between the
Carl> #0 and in calle.increment.  For example

Carl> (gdb) frame
Carl> #0  0x0000000010010a88 in callee.increment (val=val@entry=99.0, msg=...)
Carl>     at /home/.../gdb/testsuite/gdb.ada/O2_float_param/callee.adb:19
Carl> 19	   procedure Increment (Val : in out Float; Msg: String) is

Carl> +    # Note, on PowerPC the output line looks like:
Carl> +    # #0  0x0000000010010a88 in callee.increment (val=val@entry=99.0, msg=...)
Carl> +    # Not all architectures print the address.

I don't think this is architecture-dependent.  Instead, something else
is going wrong here.  Why exactly is it printing the address?  The code
here looks like:

    if (opts.addressprint)
      if (!sal.symtab
	  || frame_show_address (frame, sal)
	  || print_what == LOC_AND_ADDRESS)

Could it maybe be different inlining decisions?
Maybe seeing which of those clauses is true would show the answer.

I don't mind working around differences like this by patching the tests,
but I would like the real cause to be known and put into the comment.

Tom


More information about the Gdb-patches mailing list