<div>I tried to compile ltrace.git/HEAD for mips-64. See compile errors below. I guess this is the expected state.</div><div><br></div><div>I also built for mips-32 and found that it compiles but doesn't run. See below. </div>
<div>This result contradicts the README so if other people confirm that mips is busted,</div><div>then the README should be changed.</div><div><br></div><div>I have some but not loads of time to work on this. Let me know how I can help.</div>
<div><br></div><div>// Randy</div><div><div><br></div><div>HEAD = commit 4fb13f6aa2eb371a724e2e02e744cf993ddea8f2</div></div><div><br></div><div><br></div><div> mips64-wrs-linux-libtool: compile: mips64-wrswrap-linux-gnu-gcc -meb -mabi=64 -mhard-float --sysroot=/home/rmacleod/wrs/5.0/b/ltrace-mips64/bitbake_build/tmp/sysroots/qemumips-64 -DHAVE_CONFIG_H -I. -I../../..</div>
<div> -I../../../sysdeps/linux-gnu/mips -I../../../sysdeps/linux-gnu -I../../../sysdeps -I../../.. -Wall -Wsign-compare -Wfloat-equal -Wformat-security -Werror -O2 -pipe -g -fno-omit-frame-pointer -fvisibility=default</div>
<div> -c plt.c -fPIC -DPIC -o .libs/plt.o</div><div>| plt.c: In function 'arch_elf_add_plt_entry':</div><div>| plt.c:360:4: error: format '%llx' expects argument of type 'long long unsigned int', but argument 5 has type 'GElf_Addr' [-Werror=format]</div>
<div>| plt.c:369:3: error: format '%llx' expects argument of type 'long long unsigned int', but argument 5 has type 'GElf_Addr' [-Werror=format]</div><div>| cc1: all warnings being treated as errors</div>
<div>| make[4]: *** [plt.lo] Error 1</div><div><br></div><div>I added a (long long unsigned int) for both cases as a quick fix to see what else was broken.</div><div><br></div><div><br></div><div>Then:</div><div><br></div>
<div><div>| mips64-wrs-linux-libtool: compile: mips64-wrswrap-linux-gnu-gcc -meb -mabi=64 -mhard-float --sysroot=/home/rmacleod/wrs/5.0/b/ltrace-mips64/bitbake_build/tmp/sysroots/qemumips-64 -DHAVE_CONFIG_H -I. -I../../..</div>
<div> -I../../../sysdeps/linux-gnu/mips -I../../../sysdeps/linux-gnu -I../../../sysdeps -I../../.. -Wall -Wsign-compare -Wfloat-equal -Wformat-security -Werror -O2 -pipe -g -fno-omit-frame-pointer -fvisibility=default</div>
<div> -c plt.c -fPIC -DPIC -o .libs/plt.o</div><div>| mips64-wrs-linux-libtool: compile: mips64-wrswrap-linux-gnu-gcc -meb -mabi=64 -mhard-float --sysroot=/home/rmacleod/wrs/5.0/b/ltrace-mips64/bitbake_build/tmp/sysroots/qemumips-64 -DHAVE_CONFIG_H -I. -I../../..</div>
<div> -I../../../sysdeps/linux-gnu/mips -I../../../sysdeps/linux-gnu -I../../../sysdeps -I../../.. -Wall -Wsign-compare -Wfloat-equal -Wformat-security -Werror -O2 -pipe -g -fno-omit-frame-pointer -fvisibility=default</div>
<div> -c trace.c -fPIC -DPIC -o .libs/trace.o</div><div>| trace.c: In function 'arch_atomic_singlestep':</div><div>| trace.c:269:16: error: cast from pointer to integer of different size [-Werror=pointer-to-int-cast]</div>
<div>| trace.c:276:23: error: cast to pointer from integer of different size [-Werror=int-to-pointer-cast]</div><div>| cc1: all warnings being treated as errors</div><div>| make[4]: *** [trace.lo] Error 1</div></div><div>
<br></div><div><br></div><div>I looked at this briefly but it really seems like the mips support is only for 32 bit targets.</div><div>I'm not in a position to add full mips-64 support so I'll likely just omit it from the supported arches.</div>
<div><br></div><div><br></div><div>ltrace --help works of course but</div><div>ltrace echo a fails:</div><div><div>root@qemu0:~# ltrace echo a</div></div><div>--- SIGSEGV (Segmentation fault) ---<br></div><div><div>+++ killed by SIGSEGV +++</div>
</div><div><br></div><div><br></div><div><div>ltrace --debug 77 echo a</div></div><div>...</div><div><div>DEBUG: trace.c:164: continue_process: pid=347</div><div>DEBUG: events.c:144: next_event()</div><div>DEBUG: events.c:201: event from pid 347</div>
<div>DEBUG: events.c:262: event: SYSRET: pid=347, sysnum=91</div><div>DEBUG: handle_event.c:90: handle_event(pid=347, type=5)</div><div>DEBUG: handle_event.c:357: sysname(pid=347, sysnum=91)</div><div>DEBUG: handle_event.c:148: [347] event: sysret (SYS_munmap [91])</div>
<div>DEBUG: handle_event.c:536: handle_sysret(pid=347, sysnum=91)</div><div>DEBUG: handle_event.c:742: callstack_pop(pid=347)</div><div>DEBUG: trace.c:164: continue_process: pid=347</div><div>DEBUG: events.c:144: next_event()</div>
<div>DEBUG: events.c:201: event from pid 347</div><div>DEBUG: breakpoints.c:96: address2bpstruct(pid=347, addr=0x4000000)</div><div>DEBUG: dict.c:160: dict_find_entry()</div><div>DEBUG: events.c:327: event: SIGNAL: pid=347, signum=11</div>
<div>DEBUG: handle_event.c:90: handle_event(pid=347, type=1)</div><div>DEBUG: handle_event.c:332: shortsignal(pid=347, signum=11)</div><div>DEBUG: handle_event.c:121: [347] event: signal (SIGSEGV [11])</div><div>DEBUG: handle_event.c:393: handle_signal(pid=347, signum=11)</div>
<div>DEBUG: handle_event.c:332: shortsignal(pid=347, signum=11)</div><div>--- SIGSEGV (Segmentation fault) ---</div><div>DEBUG: trace.c:143: continue_after_signal: pid=347, signum=11</div><div>DEBUG: events.c:144: next_event()</div>
<div>DEBUG: events.c:201: event from pid 347</div><div>DEBUG: events.c:236: event: EXIT_SIGNAL: pid=347, signum=11</div><div>DEBUG: handle_event.c:90: handle_event(pid=347, type=3)</div><div>DEBUG: handle_event.c:332: shortsignal(pid=347, signum=11)</div>
<div>DEBUG: handle_event.c:134: [347] event: exit signal (SIGSEGV [11])</div><div>DEBUG: handle_event.c:414: handle_exit_signal(pid=347, signum=11)</div><div>DEBUG: handle_event.c:332: shortsignal(pid=347, signum=11)</div>
<div>+++ killed by SIGSEGV +++</div><div>DEBUG: proc.c:693: remove_proc(pid=347)</div><div>DEBUG: proc.c:685: detach_task 347 from leader 347</div><div>DEBUG: dict.c:182: dict_apply_to_all()</div><div>DEBUG: dict.c:80: dict_clear()</div>
<div>DEBUG: events.c:144: next_event()</div><div>DEBUG: events.c:153: event: No more traced programs: exiting</div></div><div><br></div><div><br></div><div>The interesting bits of the config are:</div><div><br></div><div>
<div>checking build system type... x86_64-pc-linux-gnu</div><div>checking host system type... mips-wrs-linux-gnu</div><div>checking for mips-wrs-linux-gcc... mips32-wrswrap-linux-gnu-gcc -meb -mabi=32 -mhard-float --sysroot=/home/rmacleod/wrs/5.0/b/ltrace-mips/bitbake_build/tmp/sysroots/qemumips</div>
<div>checking whether the C compiler works... yes</div><div>checking for C compiler default output file name... a.out</div><div>checking for suffix of executables... </div><div>checking whether we are cross compiling... yes</div>
<div>checking for suffix of object files... o</div><div>checking whether we are using the GNU C compiler... yes</div><div>checking whether mips32-wrswrap-linux-gnu-gcc -meb -mabi=32 -mhard-float --sysroot=/home/rmacleod/wrs/5.0/b/ltrace-mips/bitbake_build/tmp/sysroots/qemumips accepts -g... yes</div>
<div>checking for mips32-wrswrap-linux-gnu-gcc -meb -mabi=32 -mhard-float --sysroot=/home/rmacleod/wrs/5.0/b/ltrace-mips/bitbake_build/tmp/sysroots/qemumips option to accept ISO C89... none needed</div><div>checking how to print strings... printf</div>
<div>checking for a sed that does not truncate output... /bin/sed</div><div>checking for grep that handles long lines and -e... /bin/grep</div><div>checking for egrep... /bin/grep -E </div><div>checking for fgrep... /bin/grep -F</div>
<div>checking for ld used by mips32-wrswrap-linux-gnu-gcc -meb -mabi=32 -mhard-float --sysroot=/home/rmacleod/wrs/5.0/b/ltrace-mips/bitbake_build/tmp/sysroots/qemumips... mips32-wrswrap-linux-gnu-ld --sysroot=/home/rmacleod/wrs/5.0/b/ltrace-mips/bitbake_build/tmp/sysroots/qemumips -m elf32btsmip</div>
<div>checking if the linker (mips32-wrswrap-linux-gnu-ld --sysroot=/home/rmacleod/wrs/5.0/b/ltrace-mips/bitbake_build/tmp/sysroots/qemumips -m elf32btsmip) is GNU ld... yes</div><div>checking for BSD- or MS-compatible name lister (nm)... mips32-wrswrap-linux-gnu-nm</div>
<div>checking the name lister (mips32-wrswrap-linux-gnu-nm) interface... BSD nm</div><div>checking whether ln -s works... yes</div><div>checking the maximum length of command line arguments... 3458764513820540925</div><div>
checking whether the shell understands some XSI constructs... yes</div><div>checking whether the shell understands "+="... yes</div><div>checking how to convert x86_64-pc-linux-gnu file names to mips-wrs-linux-gnu format... func_convert_file_noop</div>
<div>checking how to convert x86_64-pc-linux-gnu file names to toolchain format... func_convert_file_noop</div><div>checking for mips32-wrswrap-linux-gnu-ld --sysroot=/home/rmacleod/wrs/5.0/b/ltrace-mips/bitbake_build/tmp/sysroots/qemumips -m elf32btsmip option to reload object files... -r</div>
<div>checking for mips-wrs-linux-objdump... mips32-wrswrap-linux-gnu-objdump</div><div>checking how to recognize dependent libraries... pass_all</div><div>checking for mips-wrs-linux-dlltool... no</div><div>checking for dlltool... no</div>
</div><div><br></div>-- <br>../Randy/..<br>