Debug linux crash dump on Windows
You can use GDB on Windows for that, if it was compiled with support for Linux targets. But you still need the binaries and symbols.
(Sorry, I don't know if VSCode comes with such a GDB)
GDB With a coredump file in linux
If your core file is core
just run
gdb ./my_prog core
to do some post-mortem analysis with the core
.
If you want to use gdb
without your core, consider
gdb --args ./my_prog arg
or else run just gdb ./my_prog
then issue the set args
command to gdb
.
If your process is still running as pid 1234, you could with gdb ./my_prog 1234
attach the gdb to the running process.
You really should read the gdb documentation.
Segmentation Fault (Core Dump) - Code works in VS but not in the Linux Terminal
I don't see any sign of TsuPod::songs being initialized. There is no guarantee that it's going to be NULL in the empty list case, so your
while (p != NULL)
test in TsuPod::getRemainingMemory() may pass with an insane value from the stack and blow up when you use p on the next line.
I recommend
TsuPod::TsuPod():songs(NULL) //default constructor
{
memSize = MAX_SIZE;
}
TsuPod::TsuPod(int _size):songs(NULL) //constructor for when user specifies their prefered memory size, prevents input of a size greater than MAX_SIZE or less than 0
{
if (_size > MAX_SIZE || _size <= 0)
memSize = MAX_SIZE;
else
memSize = _size;
}
to ensure that songs starts with your end of list condition.
Also, consider using std::list to do your list management in place of the roll-your-own linked list.
Vscode, python segmentation fault(core dumped)
It's probability the VS code polluted the python enviroment. You can uninstall the python enviroment and reinstall a new clean enviroment. If you use conda, you can update the enviroment by conda update --all
.
Related Topics
Trouble with Vagrant - "404 - Not Found"
How to Check Character Encoding of a File in Linux
How to Let Users Run a Script with Root Permissions
Fork() and Stdout/Stderr to The Console from Child Processes
Calculate Total Disk I/O by a Single Process
Does File ".Bash_History" Always Record Every Command I Ever Issue
Is There a Libc in Kernel Space
Why Use G++ Instead of Gcc to Compile *.Cc Files
How to Remount The /Proc Filesystem in a Docker as a R/W System
Yocto Bitbake Script Not Displaying Echo Statement
You Don't Have Permission Error in Apache in Centos
Using Socat for Raw Serial Connection
In a Sigill Handler, How to Skip The Offending Instruction
Using Netcat to Pipe Unix Socket to Tcp Socket
Sigterm Does Not Reach Node Script When Docker Runs It with '/Bin/Sh -C'