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 show filename:lineNumber in trace view ? #1033

Closed
baiwfg2 opened this issue Dec 29, 2023 · 4 comments
Closed

how to show filename:lineNumber in trace view ? #1033

baiwfg2 opened this issue Dec 29, 2023 · 4 comments

Comments

@baiwfg2
Copy link

baiwfg2 commented Dec 29, 2023

Type of feature request

None

Misc

No response

Summary Description

If we use gdb, we can see filename plus line number in backtrace output. But gef's default output in trace view doesn't have filename(whether it's absolute path or just filename) + line number, which is quite inconvenient for me.

How to enable it ?

Implementation idea/suggestion

enable filename + line number in trace view

Existing alternatives?

No response

Additional information

No response

@hugsy
Copy link
Owner

hugsy commented Dec 29, 2023

gef provides a very flexible way to handle the context view. Currently the lines of source code can be customized from the following options
image

However, because it's impossible to fit everyone use case we've made it so that users can easily create their own views. It's all documented here: https://hugsy.github.io/gef/commands/context/#adding-custom-context-panes
This allows you to adjust the context views to fit your own individual needs.

Hope this helps.

@hugsy hugsy closed this as completed Dec 30, 2023
@baiwfg2
Copy link
Author

baiwfg2 commented Mar 27, 2024

@hugsy Hi, today I try it, but found no such option. Why is that ?

gef➤  gef config context.show_basename_source_file_name_max_len 20
[!] 'context.show_basename_source_file_name_max_len' is not a valid configuration setting
gef➤  gef config context.show_prefix_source_path_name_len 10
[!] 'context.show_prefix_source_path_name_len' is not a valid configuration setting

@hugsy
Copy link
Owner

hugsy commented Mar 27, 2024

I don't know what to tell you, it works fine on all systems I tried
image

@Grazfather
Copy link
Collaborator

Make sure you are using a recent version of GEF

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

3 participants