Set stack size for debugging

Sysprogs forums Forums VisualGDB Set stack size for debugging

Tagged: 

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #24531
    AJH
    Participant

    Hello, apologies if this is a silly question. I’m debugging on an embedded Linux board using VisualGDB Ultimate and I want to set the default stack size for a the process i am debugging. I would typically do this by running “ulimit -s <new_size>” in a command window, before running the application binary.

    I assume this should be entered in the “Custom debug steps” > “Before launching GDB” section, where the command is run on the deployment machine. Unfortunately I’ve not been able to identify the correct configuration for this setting to be applied to the application being debugged, so my stack limit is always set at the default 8MB.

    Thanks in advance.

    #24533
    support
    Keymaster

    No problem, we can help you get it to work.

    Each Linux command executed by VisualGDB runs in a separate shell instance, hence the ‘ulimit’ command specified via the pre-debug steps won’t affect the program (as it will run in a separate shell).

    Instead, please try changing the GDB command on the Debug Settings page to the following:

    • Command: ulimit
    • Arguments: -s <new size> && gdb –interpreter mi $(TargetPath)
    • Start debugging with: “run” command

    This will launch gdb in the same shell instance as the ulimit command, so it will take effect as desired.

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.