linux_dsm_epyc7002/scripts/gdb/linux
Dom Cote 321958d971 scripts/gdb: improve types abstraction for gdb python scripts
Change the read_u16 function so it accepts both 'str' and 'byte' as type
for the arguments.

When calling read_memory() from gdb API, depending on if it was built
with 2.7 or 3.X, the format used to return the data will differ ( 'str'
for 2.7, and 'byte' for 3.X ).

Add a function read_memoryview() to be able to get a 'memoryview' object
back from read_memory() both with python 2.7 and 3.X .

Tested with python 3.4 and 2.7
Tested with gdb 7.7

Link: http://lkml.kernel.org/r/73621f564503137a002a639d174e4fb35f73f462.1462865983.git.jan.kiszka@siemens.com
Signed-off-by: Dom Cote <buzdelabuz2+git@gmail.com>
Tested-by: Kieran Bingham <kieran@bingham.xyz> (Py2.7,Py3.4,GDB10)
Signed-off-by: Kieran Bingham <kieran@bingham.xyz>
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2016-05-23 17:04:14 -07:00
..
__init__.py scripts/gdb: add empty package initialization script 2015-02-28 09:57:51 -08:00
.gitignore scripts/gdb: ignore byte-compiled python files 2015-02-17 14:34:54 -08:00
constants.py.in scripts/gdb: add a Radix Tree Parser 2016-05-23 17:04:14 -07:00
cpus.py scripts/gdb: cast CPU numbers to integer 2016-05-23 17:04:14 -07:00
dmesg.py scripts/gdb: fix PEP8 compliance 2015-06-30 19:44:58 -07:00
lists.py scripts/gdb: provide kernel list item generators 2016-05-23 17:04:14 -07:00
Makefile scripts/gdb: provide linux constants 2016-05-23 17:04:14 -07:00
modules.py scripts/gdb: support !CONFIG_MODULES gracefully 2016-05-23 17:04:14 -07:00
proc.py scripts/gdb: add mount point list command 2016-05-23 17:04:14 -07:00
radixtree.py scripts/gdb: add a Radix Tree Parser 2016-05-23 17:04:14 -07:00
symbols.py scripts/gdb: account for changes in module data structure 2016-03-22 15:36:02 -07:00
tasks.py scripts/gdb: add lx_thread_info_by_pid helper 2016-05-23 17:04:14 -07:00
utils.py scripts/gdb: improve types abstraction for gdb python scripts 2016-05-23 17:04:14 -07:00