Update context.py (#2072)

lint
pull/2076/head
Liu Jiayin 2 years ago committed by GitHub
parent 45665e823c
commit 600da35bee
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -751,7 +751,11 @@ def context_code(target=sys.stdout, with_banner=True, width=None):
bannerline = (
[pwndbg.ui.banner("Source (code)", target=target, width=width)] if with_banner else []
)
return bannerline + ["In file: %s" % filename] + formatted_source
return (
bannerline
+ ["In file: %s:%d" % (filename, gdb.selected_frame().find_sal().line)]
+ formatted_source
)
# Try getting source from IDA Pro Hex-Rays Decompiler
if not pwndbg.ida.available():

Loading…
Cancel
Save