| .. | .. |
|---|
| 5 | 5 | import gdb |
|---|
| 6 | 6 | import sys |
|---|
| 7 | 7 | |
|---|
| 8 | | -from linux.utils import CachedType |
|---|
| 8 | +from linux.utils import CachedType, gdb_eval_or_none |
|---|
| 9 | 9 | from linux.lists import list_for_each_entry |
|---|
| 10 | 10 | |
|---|
| 11 | 11 | generic_pm_domain_type = CachedType('struct generic_pm_domain') |
|---|
| .. | .. |
|---|
| 70 | 70 | gdb.write(' %-50s %s\n' % (kobj_path, rtpm_status_str(dev))) |
|---|
| 71 | 71 | |
|---|
| 72 | 72 | def invoke(self, arg, from_tty): |
|---|
| 73 | + if gdb_eval_or_none("&gpd_list") is None: |
|---|
| 74 | + raise gdb.GdbError("No power domain(s) registered") |
|---|
| 73 | 75 | gdb.write('domain status children\n'); |
|---|
| 74 | 76 | gdb.write(' /device runtime status\n'); |
|---|
| 75 | 77 | gdb.write('----------------------------------------------------------------------\n'); |
|---|