Tim Sowden(deleted)
|
QNX 7 Memory Model / Compiler Question
|
Tim Sowden(deleted)
01/19/2018 4:41 PM
post118415
|
QNX 7 Memory Model / Compiler Question
Hi,
We are using the 32 bit memory model of QNX 7 (relevant build file info)
[virtual=x86,bios +compress] boot = {
startup-x86 -v
PATH=/sbin:/usr/sbin:/bin:/usr/bin:/proc/boot:/x86/sbin:/x86/usr/sbin:/x86/bin:/x86/usr/bin LD_LIBRARY_PATH=/proc/boot:
/lib:/usr/lib:/lib/dll:/lib/dll/pci:/x86/lib:/x86/usr/lib:/x86/lib/dll procnto-smp-instr -v
}
We are porting over an existing code base from 6.32 that works using gcc 3.3.5. I've changed my Makefiles to use 5.5.4,
gcc_ntox86 so that my compile and link lines look as follows:
Building main/src
make[1]: Entering directory 'C:/Users/Admin/ide-7.0-workspace/MainlineSource/Controller/main/src'
qcc -V5.4.0,gcc_ntox86 -lang-c++ -D_PTHREADS=1 -g -w9 -Wall -Werror -Wno-deprecated -M -I../../../ThirdPartyLibs/POCO
/include -I../../../ThirdPartyLibs/expat-2.2.4/include -I../../../SystemCore/CommonOS/src -I../../../SystemCore/Core/
src -I../../../Controls/src -I../../../HardwareManagers/EthernetIOMgr/src -I../../../HardwareManagers/NativeIOMgr/src
-I../../../HardwareManagers/LMBoardMgr/src -I../../../Specials/src -I../../../HardwareManagers/DeviceMgr/src -c
deviceMgr.cpp -o ../obj/debug/deviceMgr.o
Linking specialsMgr
qcc -V5.4.0,gcc_ntox86 -E -lang-c++ -D_PTHREADS=1 -g -w9 -Wall -Werror -Wno-deprecated -M -I../../../ThirdPartyLibs/POCO
/include -I../../../ThirdPartyLibs/expat-2.2.4/include -I../../../SystemCore/CommonOS/src -I../../../SystemCore/Core/
src -I../../../Controls/src -I../../../HardwareManagers/EthernetIOMgr/src -I../../../HardwareManagers/NativeIOMgr/src
-I../../../HardwareManagers/LMBoardMgr/src -I../../../Specials/src -I../../../HardwareManagers/DeviceMgr/src -Wp,-
MM,-MP,-MT,../obj/debug/../obj/debug/deviceMgr.o deviceMgr.cpp > ../obj/debug/deviceMgr.d
qcc -V5.4.0,gcc_ntox86 -lang-c++ -g -M -D_PTHREADS=1 -l m ../obj/debug/deviceMgr.o -Wl,--start-group,../../../Controller
/main/libs/debug/core.a,../../../Controller/main/libs/debug/commonOS.a,../../../Controller/main/libs/debug/devices.a,--
end-group -Wl,--start-group,../../../ThirdPartyLibs/POCO/libs/libPocoNetd.a,../../../ThirdPartyLibs/POCO/libs/
libPocoFoundationd.a,../../../ThirdPartyLibs/POCO/libs/libPocoUtild.a,../../../ThirdPartyLibs/POCO/libs/libPocoJSONd.a,-
-end-group -lsocket -lexpat -o ../obj/debug/deviceMgr
My understanding is this is building 32 bit binaries.
However when our executables run they all crash quite quickly and always doing a memset() command. If I capture a core
file from one of the crashes I see (not sure why I get the libc.so.4 mismatch)
C:\Users\Admin\ide-7.0-workspace\MainlineSource\Controller\main\bin\debug>ntox86-gdb specialsMgr specialsMgr.core
GNU gdb (GDB) 7.12 [qnx700 r1234]
Copyright (C) 2016 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "--host=x86_64-w64-mingw32 --target=i586-pc-nto-qnx7.0.0".
Type "show configuration" for configuration details.Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from specialsMgr...done.
[New pid 4010029 tid 1]
[New pid 4010029 tid 2]
[New pid 4010029 tid 3]
[New pid 4010029 tid 4]
warning: the debug information found in "C:/QNX700//target/qnx7/x86/lib/libc.so.4.sym" does not match "C:/QNX700//target
/qnx7/x86/lib/libc.so.4" (CRC mismatch).
Program terminated with signal SIGSEGV, Segmentation fault.
#0 0xb0373873 in memset () from C:/QNX700//target/qnx7/x86/lib/libc.so.4
[Current thread is 3 (pid 4010029 tid 3)]
(gdb) where
#0 0xb0373873 in memset () from C:/QNX700//target/qnx7/x86/lib/libc.so.4
#1 0x08136536 in WebSocketConnection::receiveData...
View Full Message
|
|
|