Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions cmdebug/svd_gdb.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,11 +62,11 @@ def complete(self, text, word):

# "svd_load <tab>" or "svd_load ST<tab>"
if num_args == 1:
prefix = word.lower()
prefix = "" if word is None else word.lower()
return [vendor for vendor in self.vendors if vendor.lower().startswith(prefix)]
# "svd_load STMicro<tab>" or "svd_load STMicro STM32F1<tab>"
elif num_args == 2 and args[0] in self.vendors:
prefix = word.lower()
prefix = "" if word is None else word.lower()
filenames = self.vendors[args[0]]
return [fname for fname in filenames if fname.lower().startswith(prefix)]
return gdb.COMPLETE_NONE
Expand Down