Re: [PATCH] gdb: correct sys.path insertion
From: Johannes Berg
Date: Thu Dec 17 2020 - 03:15:00 EST
Hi Jan,
> > -sys.path.insert(0, os.path.dirname(__file__) + "/scripts/gdb")
> > +sys.path.insert(0, os.path.dirname(__file__))
> >
> > try:
> > gdb.parse_and_eval("0")
> >
>
> How did you test that, which setup? I just ran "gdb
> <linux>/build/vmlinux", and "python print(sys.path)" didn't expose this
> duplication. So your change would actually break that common case.
Oh, seems that was my mistake. I was trying to (explicitly) load the
file as "scripts/gdb/vmlinux-gdb.py" rather than using the symlink that
gets installed.
Never mind.
johannes