itas109 / CSerialPort

CSerialPort - lightweight cross-platform serial port library for C++/C/C#/Java/Python/Node.js/Electron
https://blog.csdn.net/itas109/article/details/84282860
Other
710 stars 337 forks source link

FreeBSD itas109::CSerialPortInfo::availablePortInfos() core dumped #39

Open itas109 opened 3 years ago

itas109 commented 3 years ago

Describe the bug FreeBSD itas109::CSerialPortInfo::availablePortInfos() core dumped

Trace/BPT trap (core dumped) Illegal instruction (core dumped)

To Reproduce Steps to reproduce the behavior: call function itas109::CSerialPortInfo::availablePortInfos()

Screenshots

Program terminated with signal SIGILL, Illegal instruction.
#0  0x00000000002156e4 in getPortInfoList() ()
[Current thread is 1 (LWP 100200)]
(gdb) where
#0  0x00000000002156e4 in getPortInfoList() ()
#1  0x0000000000215834 in CSerialPortInfoUnixBase::availablePortInfos() ()
#2  0x00000000002156b4 in itas109::CSerialPortInfo::availablePortInfos() ()
...

Desktop (please complete the following information):

itas109 commented 3 years ago

function getPortInfoList only support linux and mac in SerialPortInfoUnixBase.cpp( 2020-09-20 )

vector<SerialPortInfo> getPortInfoList()
{
    vector<SerialPortInfo> portInfoList;
#ifdef I_OS_LINUX
    ...
#elif defined I_OS_MAC
    ....
#endif
    return portInfoList;
}