anakryiko / retsnoop

Investigate kernel error call stacks
BSD 2-Clause "Simplified" License
186 stars 32 forks source link

fix default error message keyword for presets (and add -c ? for list) #15

Closed martinetd closed 1 year ago

martinetd commented 1 year ago

Just playing with this after link from HN, and error confused me by saying -p PRESET. Probably ought to fix that :)

I'm not adamant on -c ?, feel free to only take the first patch -- it's just the first way I could think of to get the list without looking at the code. Turned out there were less than I thought so it's probably not very useful for most people right now, but assuming more presets get added it could become handy?

anakryiko commented 1 year ago

One reason I didn't document preset is that because it was very useful at the very beginning when retsnoop didn't support looking up functions by source code location. I'd like to enhance and rework presets a bit more to support source code location globs as well, and I'll need input from people to define various presets for various subsystems.

As for -c ?, it's first time for me to see such a convention. Let's drop it for now, I'll need to think what's the best way to handle this discoverability issue...

martinetd commented 1 year ago

One reason I didn't document preset is that because it was very useful at the very beginning when retsnoop didn't support looking up functions by source code location. I'd like to enhance and rework presets a bit more to support source code location globs as well, and I'll need input from people to define various presets for various subsystems.

Yeah I think it'll be much more useful once we have more presets. I don't mind specifying source paths but if I want to advertise this to coworkers it'd need more presets in my opinion -- then again if they need that the tool might not be as useful for them, I don't know...

As for -c ?, it's first time for me to see such a convention. Let's drop it for now, I'll need to think what's the best way to handle this discoverability issue...

haven't seen that much aside of qemu, which uses it a bit of everywhere for hard to discover things (list of devices, list of options supported for each device etc) I've dropped the commit, this PR is now trivial enough that if you want to redo it rather than merging I'm fine with it :)

anakryiko commented 1 year ago

Thanks!