diff options
Diffstat (limited to 'scripts/gdb')
| -rw-r--r-- | scripts/gdb/linux/Makefile | 25 | ||||
| -rw-r--r-- | scripts/gdb/linux/constants.py.in | 12 | ||||
| -rw-r--r-- | scripts/gdb/linux/proc.py | 12 |
3 files changed, 25 insertions, 24 deletions
diff --git a/scripts/gdb/linux/Makefile b/scripts/gdb/linux/Makefile index aba23be985e4..3df395a9c2ce 100644 --- a/scripts/gdb/linux/Makefile +++ b/scripts/gdb/linux/Makefile | |||
| @@ -1,24 +1,25 @@ | |||
| 1 | # SPDX-License-Identifier: GPL-2.0 | 1 | # SPDX-License-Identifier: GPL-2.0 |
| 2 | always := gdb-scripts | ||
| 3 | 2 | ||
| 4 | SRCTREE := $(abspath $(srctree)) | ||
| 5 | |||
| 6 | $(obj)/gdb-scripts: | ||
| 7 | ifneq ($(KBUILD_SRC),) | 3 | ifneq ($(KBUILD_SRC),) |
| 8 | $(Q)ln -fsn $(SRCTREE)/$(obj)/*.py $(objtree)/$(obj) | 4 | |
| 5 | symlinks := $(patsubst $(srctree)/$(src)/%,%,$(wildcard $(srctree)/$(src)/*.py)) | ||
| 6 | |||
| 7 | quiet_cmd_symlink = SYMLINK $@ | ||
| 8 | cmd_symlink = ln -fsn $(patsubst $(obj)/%,$(abspath $(srctree))/$(src)/%,$@) $@ | ||
| 9 | |||
| 10 | extra-y += $(symlinks) | ||
| 11 | $(addprefix $(obj)/, $(symlinks)): FORCE | ||
| 12 | $(call if_changed,symlink) | ||
| 13 | |||
| 9 | endif | 14 | endif |
| 10 | @: | ||
| 11 | 15 | ||
| 12 | quiet_cmd_gen_constants_py = GEN $@ | 16 | quiet_cmd_gen_constants_py = GEN $@ |
| 13 | cmd_gen_constants_py = \ | 17 | cmd_gen_constants_py = \ |
| 14 | $(CPP) -E -x c -P $(c_flags) $< > $@ ;\ | 18 | $(CPP) -E -x c -P $(c_flags) $< > $@ ;\ |
| 15 | sed -i '1,/<!-- end-c-headers -->/d;' $@ | 19 | sed -i '1,/<!-- end-c-headers -->/d;' $@ |
| 16 | 20 | ||
| 17 | targets += constants.py | 21 | extra-y += constants.py |
| 18 | $(obj)/constants.py: $(SRCTREE)/$(obj)/constants.py.in FORCE | 22 | $(obj)/constants.py: $(src)/constants.py.in FORCE |
| 19 | $(call if_changed_dep,gen_constants_py) | 23 | $(call if_changed_dep,gen_constants_py) |
| 20 | 24 | ||
| 21 | build_constants_py: $(obj)/constants.py | 25 | clean-files := *.pyc *.pyo |
| 22 | @: | ||
| 23 | |||
| 24 | clean-files := *.pyc *.pyo $(if $(KBUILD_SRC),*.py) $(obj)/constants.py | ||
diff --git a/scripts/gdb/linux/constants.py.in b/scripts/gdb/linux/constants.py.in index 7aad82406422..d3319a80788a 100644 --- a/scripts/gdb/linux/constants.py.in +++ b/scripts/gdb/linux/constants.py.in | |||
| @@ -37,12 +37,12 @@ | |||
| 37 | import gdb | 37 | import gdb |
| 38 | 38 | ||
| 39 | /* linux/fs.h */ | 39 | /* linux/fs.h */ |
| 40 | LX_VALUE(MS_RDONLY) | 40 | LX_VALUE(SB_RDONLY) |
| 41 | LX_VALUE(MS_SYNCHRONOUS) | 41 | LX_VALUE(SB_SYNCHRONOUS) |
| 42 | LX_VALUE(MS_MANDLOCK) | 42 | LX_VALUE(SB_MANDLOCK) |
| 43 | LX_VALUE(MS_DIRSYNC) | 43 | LX_VALUE(SB_DIRSYNC) |
| 44 | LX_VALUE(MS_NOATIME) | 44 | LX_VALUE(SB_NOATIME) |
| 45 | LX_VALUE(MS_NODIRATIME) | 45 | LX_VALUE(SB_NODIRATIME) |
| 46 | 46 | ||
| 47 | /* linux/mount.h */ | 47 | /* linux/mount.h */ |
| 48 | LX_VALUE(MNT_NOSUID) | 48 | LX_VALUE(MNT_NOSUID) |
diff --git a/scripts/gdb/linux/proc.py b/scripts/gdb/linux/proc.py index 0aebd7565b03..2f01a958eb22 100644 --- a/scripts/gdb/linux/proc.py +++ b/scripts/gdb/linux/proc.py | |||
| @@ -114,11 +114,11 @@ def info_opts(lst, opt): | |||
| 114 | return opts | 114 | return opts |
| 115 | 115 | ||
| 116 | 116 | ||
| 117 | FS_INFO = {constants.LX_MS_SYNCHRONOUS: ",sync", | 117 | FS_INFO = {constants.LX_SB_SYNCHRONOUS: ",sync", |
| 118 | constants.LX_MS_MANDLOCK: ",mand", | 118 | constants.LX_SB_MANDLOCK: ",mand", |
| 119 | constants.LX_MS_DIRSYNC: ",dirsync", | 119 | constants.LX_SB_DIRSYNC: ",dirsync", |
| 120 | constants.LX_MS_NOATIME: ",noatime", | 120 | constants.LX_SB_NOATIME: ",noatime", |
| 121 | constants.LX_MS_NODIRATIME: ",nodiratime"} | 121 | constants.LX_SB_NODIRATIME: ",nodiratime"} |
| 122 | 122 | ||
| 123 | MNT_INFO = {constants.LX_MNT_NOSUID: ",nosuid", | 123 | MNT_INFO = {constants.LX_MNT_NOSUID: ",nosuid", |
| 124 | constants.LX_MNT_NODEV: ",nodev", | 124 | constants.LX_MNT_NODEV: ",nodev", |
| @@ -184,7 +184,7 @@ values of that process namespace""" | |||
| 184 | fstype = superblock['s_type']['name'].string() | 184 | fstype = superblock['s_type']['name'].string() |
| 185 | s_flags = int(superblock['s_flags']) | 185 | s_flags = int(superblock['s_flags']) |
| 186 | m_flags = int(vfs['mnt']['mnt_flags']) | 186 | m_flags = int(vfs['mnt']['mnt_flags']) |
| 187 | rd = "ro" if (s_flags & constants.LX_MS_RDONLY) else "rw" | 187 | rd = "ro" if (s_flags & constants.LX_SB_RDONLY) else "rw" |
| 188 | 188 | ||
| 189 | gdb.write( | 189 | gdb.write( |
| 190 | "{} {} {} {}{}{} 0 0\n" | 190 | "{} {} {} {}{}{} 0 0\n" |
