Hope it’s okay with the Haiku devs; I’ve submitted a proposal for KDL where instead of showing,
Welcome to kernel debugging land
My idea is to show something like:
----------------------------------------------------
If you have opened the KDL shell by choice, welcome.
----------------------------------------------------
IF THIS HAS RANDOMLY APPEARED...
You need to restart your computer. Type reboot to restart.
If you cannot restart, hold down the Power button.
----------------------------------------------------
Of course, this is just an idea, which you guys are free to change or what not, but I did want to try to have the gist of the idea out there. Hopefully, by adding a message that both end users and developers can read here, it’ll make what has happened clearer. (And since the scrolling output may hide the whole message, hopefully the “If you cannot restart” line will still be visible.)
Anyway, hope again that this is okay with the team; thanks for reading…
That’s most likely because I did it wrong. This is the first time I’ve tried to do something like this. From the master branch, I clicked the pencil (edit) for debug.cpp, to which GitHub mentioned to fork where I could do changes and propose it. So, it created a fork, where I edited the file, then proposed the change. And… I see my error. I forgot to click “Open pull request”. So I did, and received:
Merging is blocked
The base branch restricts merging to authorized users.
So, that’s that. I’ve closed the pull request for now (Closed with unmerged commits; This pull request is closed, but the apgreimann:patch-1 branch has unmerged commits.)
But at any rate, my change is shown here on the forum, so if anyone wants to copy-paste it into an editor or what not, they can…
kprintf("----------------------------------------------------\n");
kprintf("If you have opened the KDL shell by choice, welcome.\n");
kprintf("----------------------------------------------------\n");
kprintf("IF THIS HAS RANDOMLY APPEARED...\n");
kprintf("You need to restart your computer. Type reboot to restart.\n");
kprintf("If you cannot restart, hold down the Power button.\n");
kprintf("----------------------------------------------------\n");
That would definitely explain it! I’ve visited Haiku’s GitHub several times, and never read that little tidbit, even though it was written right in front of me above the stats all the time!
Okay, now that I’ve seen my alarmingly obvious, embarrasing mistake, I’ve signed into Gerrit. I’ve never used it; as a newbie to it, how would I propose the changes?
I’ve looked under the Changes and Your menus in what’s apparently the “new UI”. In the “old UI”, this is the All and My tabs. I can view everything, but I don’t see any links for adding or editing anything.
Thanks, all, for your patience as I’ve made a fool out of myself. This has been quite the learning process!
Oh the kernel panic. There is nothing more frightening and frustrating that those horrible white screens… I doubt that singing an haiku to the user is enough to alleviate his/her pain.
Too long for my taste. Pressing the power button if nothing else works, is a given, I’d say.
“Welcome to kernel debugging land…” must stay as greeting!
IMO, one additional line would be enough:
Welcome to kernel debugging land...
Type 'co' to try to leave KDL, 'reboot' to restart, or 'help' for all KDL commands.
Agree. This is a lot shorter, and sweeter. There’s two reasons mine was long though:
Backscrolling may prevent seeing the whole message. If every other line was blocked, If you cannot restart, hold down the Power button would still be visible.
What if the user cannot type? I have had that happen before; forcing continue also sometimes can leave things unstable, imho, as I’ve done that before as well. But maybe I’m just bad at trying to debug
But I really like yours though; it says it all in just one extra line, and is a great improvement to just having ‘Welcome to kernel debugging land…’ shown. Would you guys consider adding your version to Haiku then? Because, again, it does add to the original…
IMO Humdinger’s one-liner is good; I don’t really understand your objection about back-scrolling… if the whole message is overwritten because e.g. the backtrace is too long, then it’s overwritten, and not much can be done about that.
I think we should only add this message in release builds though; builds with KDEBUG defined are intended for full-system debugging and so the message would just be redundant.