scripts/gdb/vmalloc: disable on no-MMU

vmap_area does not exist on no-MMU, therefore the GDB scripts fail to

Traceback (most recent call last):
  File "<...>/", line 51, in <module>
    import linux.vmalloc
  File "<...>/scripts/gdb/linux/", line 14, in <module>
    vmap_area_ptr_type = vmap_area_type.get_type().pointer()
  File "<...>/scripts/gdb/linux/", line 28, in get_type
    self._type = gdb.lookup_type(self._name)
gdb.error: No struct type named vmap_area.

To fix this, disable the command and add an informative error message if
CONFIG_MMU is not defined, following the example of lx-slabinfo.

Fixes: 852622bf3616 ("scripts/gdb/vmalloc: add vmallocinfo support")
Signed-off-by: Ben Wolsieffer <>
Cc: Jan Kiszka <>
Cc: Kieran Bingham <>
Cc: Kuan-Ying Lee <>
Cc: <>
Signed-off-by: Andrew Morton <>
2 files changed