Skip to content

[feature] Add serial option in gdbtarget #436

@andy9a9

Description

@andy9a9

I would like to use this extension for kgdbc. First step is to set the baudrate which is basically not possible due to late initialization (discussion ongoing in #432 ). So maybe would be nice to have options like:

"target":{
    "parameters": {
        "type": "tcp" # or serial
         "args": [
         ]
    },
    "serial": {
        "device": "/dev/ttyX",
        "baudrate": "115200"
    }
}

This will allow to directly select the type and custom commands like set serial baud 115200 won't be needed.
Next idea, while debugging the kernel on embedded systems should be fine to have an option to stop refreshing the threads. With this baudrate the response is so slow there is basically no way to use it. On the other hand, if I comment out the thread request like:

try {
    /*if (!this.isRunning) {
    const result = await mi.sendThreadInfoRequest(this.gdb, {});
    this.threads = result.threads
           .map((thread) => this.convertThread(thread))
           .sort((a, b) => a.id - b.id);
    }*/

    response.body = {
        threads: this.threads,
    };

    this.sendResponse(response);

system is more-less responsible and could be used for this purposes. Maybe the no-stop mode is for this purposes, but the kgdbc is not supporting it.

wdty?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions