Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

how to runtomain when pressed reset command #366

Closed
wyl2008056 opened this issue Dec 2, 2020 · 7 comments
Closed

how to runtomain when pressed reset command #366

wyl2008056 opened this issue Dec 2, 2020 · 7 comments

Comments

@wyl2008056
Copy link

how to runtomain when pressed reset command

@KrestenHelstrup
Copy link

Hi @wyl2008056
I also had issues with runToMain, so instead I use postLaunchCommands and PostRestartCommands. See attached part of my launch file.

        "postLaunchCommands": [
            "set mem inaccessible-by-default off",
            "monitor clrbp",
            "monitor reset",
            "break main",
            "continue"
        ],
        "postRestartCommands": [
            "break main",
            "continue"
        ]

Br

@wyl2008056
Copy link
Author

Hi,@KrestenHelstrup
thank you !!!
it working for me.

@KrestenHelstrup
Copy link

@Marus - Is this expected behavior or is it a bug in runToMain ?

@TorBlackbeard
Copy link
Contributor

TorBlackbeard commented Feb 27, 2021

"postRestartCommands": [
"break main",
"continue"
]
Did the trick for me!

Run-to-main works fine for me, so I didn't take the other bits from @KrestenHelstrup's solution.

@KrestenHelstrup
Copy link

Sounds like a mistake if restart is running preLaunchTask again.

@haneefdm
Copy link
Collaborator

haneefdm commented Feb 27, 2021

This behavior was intentional according to @Marus because processors can very limited breakpoints (as low as 2). I agree with that. Instead of using runToMain you can always set a breakpoint in main yourself.

Note that runToMain uses a temporary bkpt so that other bkpts can be accommodated. And it can fail on a restart. Difficult to explain

@tpilt
Copy link

tpilt commented Feb 27, 2021

Thanks @KrestenHelstrup , and sorry : moved that part of the question to a new ticket:
#403

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants