Giter Club home page Giter Club logo

Comments (14)

WebFreak001 avatar WebFreak001 commented on May 31, 2024

which one of those are your autorun commands? gdb-set, environment-directory and target-select are predefined ones which are always executed first

from code-debug.

csholmq avatar csholmq commented on May 31, 2024
{
    "version": "0.4.2",
    "configurations": [
        {
            "name": "Debug GDB",
            "type": "gdb",
            "request": "attach",
            "target": "localhost:4444",
            "remote": true,
            "printCalls": true,
            "executable": "${workspaceRoot}/Sw/A_XMC/out/use/A_Myriad_A_5_9.elf",
            "cwd": "${workspaceRoot}/Sw/A_XMC/out/obj",
            "autorun": [
                "target remote localhost:4444",
                "monitor interface=0",
                "monitor port=0",
                "monitor speed=500000",
                "monitor type=0",
                // "monitor protocol=0",
                "monitor unit=2",
                "monitor connect"
            ]
        }
    ]
}

from code-debug.

WebFreak001 avatar WebFreak001 commented on May 31, 2024

A program is being debugged already. Kill it? (y or n) [answered Y; input not from terminal]

I think GDB calls those again, the code only runs the commands once

from code-debug.

WebFreak001 avatar WebFreak001 commented on May 31, 2024

Also see this for the implementation: https://github.com/WebFreak001/code-debug/blob/master/src/gdb.ts#L125-L133

Note: javascript promises (the then + callback) can only be called once (javascript ensures that)

from code-debug.

csholmq avatar csholmq commented on May 31, 2024

Ok, I removed target remote localhost:4444 and it disappeared. It's odd because I always needed that in an earlier version of this plugin.

Still trying to trick my GDB debugger to think that it's paused.

from code-debug.

WebFreak001 avatar WebFreak001 commented on May 31, 2024

Not implemented stop reason (assuming exception): undefined

Here it tries to pause, but because it gets called before finishing the starting up it then thinks its resumed

from code-debug.

csholmq avatar csholmq commented on May 31, 2024

You mean that the debugger tries to stop before the autorun commands have run?

from code-debug.

WebFreak001 avatar WebFreak001 commented on May 31, 2024

Thats partly correct. the debugger sends a "Stop" signal to the UI so you get the actions like stepping and resuming and then sends a "Start" signal to the UI when the autorun commands have run. Those signals are only for the UI though

from code-debug.

csholmq avatar csholmq commented on May 31, 2024

Well, what I'm trying to accomplish is to trick the debugger into thinking that it's paused. Would leaving out "Start" after the autorun do that?

I tried with a more standard

{
    "version": "0.4.2",
    "configurations": [
        {
            "name": "Debug GDB",
            "type": "gdb",
            "request": "attach",
            "target": "localhost:4444",
            "remote": true,
            "printCalls": true,
            "executable": "${workspaceRoot}/Sw/A_XMC/out/use/A_Myriad_A_5_9.elf",
            "cwd": "${workspaceRoot}/Sw/A_XMC/out/obj",
        }
    ]
}

but I still got the Not implemented stop reason

1-gdb-set target-async on
2-environment-directory "c:\\dev\\VdW\\Myriad_trunk/Sw/A_XMC/out/obj"
3-target-select remote localhost:4444
undefined=thread-group-added,id="i1"
Reading symbols from c:\dev\VdW\Myriad_trunk/Sw/A_XMC/out/use/A_Myriad_A_5_9.elf...
done.
Not implemented stop reason (assuming exception): undefined
4-stack-list-frames 0 20
5-data-evaluate-expression ArOS_1msTimerU32
6-stack-list-variables --thread 1 --frame 0 --simple-values

from code-debug.

WebFreak001 avatar WebFreak001 commented on May 31, 2024

This is a bug. I will fix it later today. I just need to set a boolean "crash" if the stop gets called before starting. Then when its finished it can immediately stop

from code-debug.

csholmq avatar csholmq commented on May 31, 2024

Not sure if this is resolved.

1-gdb-set target-async on
2-environment-directory "c:\\dev\\abc/Sw/A_XMC/out/obj"
3-target-select remote localhost:4444
undefined=thread-group-added,id="i1"
Not implemented stop reason (assuming exception): undefined
monitor interface=0
monitor port=0
monitor speed=500000
monitor type=0
monitor unit=2
monitor connect
add-symbol-file ../use/A_Myriad.elf 0x8020000
4-stack-list-frames 0 20
monitor interface=0
monitor port=0
monitor speed=500000
monitor type=0
monitor unit=2
monitor connect
add-symbol-file ../use/A_Myriad.elf 0x8020000
add symbol table from file "../use/A_Myriad_A_5_9.elf" at
    .text_addr = 0x8020000
(y or n) [answered Y; input not from terminal]
Reading symbols from c:\dev\abc\Sw\A_XMC\out\obj/../use/A_Myriad.elf...
done.
Cannot access memory at address 0xa404

from code-debug.

WebFreak001 avatar WebFreak001 commented on May 31, 2024

ok this is weird now

from code-debug.

GitMensch avatar GitMensch commented on May 31, 2024

@csholmq Can you still reproduce that?

from code-debug.

GitMensch avatar GitMensch commented on May 31, 2024

No reproducer any more -> closed.

from code-debug.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.