# Bits shared between mi_make_breakpoint and mi_make_breakpoint_multi.
-proc mi_make_breakpoint_1 {attr_list thread cond evaluated-by times \
- ignore script original-location} {
+proc mi_make_breakpoint_1 {attr_list thread inferior cond evaluated-by \
+ times ignore script original-location} {
set result "bkpt=\\\{[mi_build_kv_pairs $attr_list]"
# There are always exceptions.
append result [mi_build_kv_pairs [list "thread" $thread]]
}
+ # If INFERIOR is not present, do not output it.
+ if {[string length $inferior] > 0} {
+ append result ","
+ append result [mi_build_kv_pairs [list "inferior" $inferior]]
+ }
+
# If COND is not present, do not output it.
if {[string length $cond] > 0} {
append result ","
lappend attr_list "addr" "<MULTIPLE>"
- # Only include the inferior field if it was set. This field is
- # optional in the MI output.
- if {$inferior ne ""} {
- lappend attr_list "inferior" $inferior
- }
-
set result [mi_make_breakpoint_1 \
- $attr_list $thread $cond ${evaluated-by} $times \
- $ignore $script ${original-location}]
+ $attr_list $thread $inferior $cond ${evaluated-by} \
+ $times $ignore $script ${original-location}]
append result ","
append result [mi_build_kv_pairs [list "locations" $locations]]
proc mi_make_breakpoint_pending {args} {
parse_args {{number .*} {type .*} {disp .*} {enabled .*}
- {pending .*} {original-location .*} {thread ""} {cond ""}
- {script ""} {times .*}}
+ {pending .*} {original-location .*} {thread ""} {inferior ""}
+ {cond ""} {script ""} {times .*}}
set attr_list {}
foreach attr [list number type disp enabled] {
set evaluated-by ""
set result [mi_make_breakpoint_1 \
- $attr_list $thread $cond ${evaluated-by} $times \
- $ignore $script ${original-location}]
+ $attr_list $thread $inferior $cond ${evaluated-by} \
+ $times $ignore $script ${original-location}]
append result "\\\}"
return $result
{func .*} {file .*} {fullname .*} {line .*}
{thread-groups \\\[.*\\\]} {times .*} {ignore 0}
{script ""} {original-location .*} {cond ""} {evaluated-by ""}
- {thread ""}}
+ {thread ""} {inferior ""}}
set attr_list {}
foreach attr [list number type disp enabled addr func file \
}
set result [mi_make_breakpoint_1 \
- $attr_list $thread $cond ${evaluated-by} $times \
- $ignore $script ${original-location}]
+ $attr_list $thread $inferior $cond ${evaluated-by} \
+ $times $ignore $script ${original-location}]
append result "\\\}"
return $result