Skip to main content
formatting
Source Link
komodosp
  • 121
  • 1
  • 5

I managed to get a core out of this (I think!) with a workaround. This still doesn't answer the question but at least gets me over this hump.

I created my own script:

#!/bin/bash 
echo $@ > /home/root/arguments.txt

if [ -p /dev/stdin ]; then
        echo "Data was piped to this script!" >> /home/root/arguments.txt
    cat > /home/root/core.bin 
else
    echo "No data received" >> /home/root/arguments.txt
fi

And set the core_pattern to pipe through this script rather than systemd-coredump

This allows me to both see the arguments passed into the script (so it does answer that part of the question!) contained in arguments.txt and the core itself is written to core.bin

(At least I think it's the core - it's not giving me a huge amount of info but I'm a bit of a newbie at gdb so that could be the reason.)

I managed to get a core out of this (I think!) with a workaround. This still doesn't answer the question but at least gets me over this hump.

I created my own script:

#!/bin/bash 
echo $@ > /home/root/arguments.txt

if [ -p /dev/stdin ]; then
        echo "Data was piped to this script!" >> /home/root/arguments.txt
    cat > /home/root/core.bin 
else
    echo "No data received" >> /home/root/arguments.txt
fi

And set the core_pattern to pipe through this script rather than systemd-coredump

This allows me to both see the arguments passed into the script (so it does answer that part of the question!) contained in arguments.txt and the core itself is written to core.bin

(At least I think it's the core - it's not giving me a huge amount of info but I'm a bit of a newbie at gdb so that could be the reason.)

I managed to get a core out of this (I think!) with a workaround. This still doesn't answer the question but at least gets me over this hump.

I created my own script:

#!/bin/bash 
echo $@ > /home/root/arguments.txt

if [ -p /dev/stdin ]; then
    echo "Data was piped to this script!" >> /home/root/arguments.txt
    cat > /home/root/core.bin 
else
    echo "No data received" >> /home/root/arguments.txt
fi

And set the core_pattern to pipe through this script rather than systemd-coredump

This allows me to both see the arguments passed into the script (so it does answer that part of the question!) contained in arguments.txt and the core itself is written to core.bin

(At least I think it's the core - it's not giving me a huge amount of info but I'm a bit of a newbie at gdb so that could be the reason.)

Source Link
komodosp
  • 121
  • 1
  • 5

I managed to get a core out of this (I think!) with a workaround. This still doesn't answer the question but at least gets me over this hump.

I created my own script:

#!/bin/bash 
echo $@ > /home/root/arguments.txt

if [ -p /dev/stdin ]; then
        echo "Data was piped to this script!" >> /home/root/arguments.txt
    cat > /home/root/core.bin 
else
    echo "No data received" >> /home/root/arguments.txt
fi

And set the core_pattern to pipe through this script rather than systemd-coredump

This allows me to both see the arguments passed into the script (so it does answer that part of the question!) contained in arguments.txt and the core itself is written to core.bin

(At least I think it's the core - it's not giving me a huge amount of info but I'm a bit of a newbie at gdb so that could be the reason.)