Print this page
11581 'debug' loader option is a little obscure
Reviewed by: Jerry Jelinek <jerry.jelinek@joyent.com>
Reviewed by: Rob Johnston <rob.johnston@joyent.com>

Split Close
Expand all
Collapse all
          --- old/usr/src/boot/sys/boot/forth/loader.4th
          +++ new/usr/src/boot/sys/boot/forth/loader.4th
↓ open down ↓ 148 lines elided ↑ open up ↑
 149  149    else
 150  150      drop
 151  151    then
 152  152    s" boot_kmdb" getenv dup -1 <> if
 153  153       s" YES" compare-insensitive 0= if
 154  154         [char] k addr len + c! len 1+ to len
 155  155       then
 156  156    else
 157  157      drop
 158  158    then
 159      -  s" boot_debug" getenv dup -1 <> if
      159 +  s" boot_drop_into_kmdb" getenv dup -1 <> if
 160  160       s" YES" compare-insensitive 0= if
 161  161         [char] d addr len + c! len 1+ to len
 162  162       then
 163  163    else
 164  164      drop
 165  165    then
 166  166    s" boot_reconfigure" getenv dup -1 <> if
 167  167       s" YES" compare-insensitive 0= if
 168  168         [char] r addr len + c! len 1+ to len
 169  169       then
↓ open down ↓ 109 lines elided ↑ open up ↑
 279  279  builtin: boot-conf
 280  280  
 281  281  only forth definitions also support-functions
 282  282  
 283  283  \ 
 284  284  \ in case the boot-args is set, parse it and extract following options:
 285  285  \ -a to boot_ask=YES
 286  286  \ -s to boot_single=YES
 287  287  \ -v to boot_verbose=YES
 288  288  \ -k to boot_kmdb=YES
 289      -\ -d to boot_debug=YES
      289 +\ -d to boot_drop_into_kmdb=YES
 290  290  \ -r to boot_reconfigure=YES
 291  291  \ -B acpi-user-options=X to acpi-user-options=X
 292  292  \ 
 293  293  \ This is needed so that the menu can manage these options. Unfortunately, this
 294  294  \ also means that boot-args will override previously set options, but we have no
 295  295  \ way to control the processing order here. boot-args will be rebuilt at boot.
 296  296  \ 
 297  297  \ NOTE: The best way to address the order is to *not* set any above options
 298  298  \ in boot-args.
 299  299  
↓ open down ↓ 148 lines elided ↑ open up ↑
 448  448        begin                     \ loop till ' ' or 0
 449  449          dup c@ dup 0<> swap bl <> and
 450  450        while
 451  451          dup c@ [char] s = if
 452  452            s" set boot_single=YES" evaluate TRUE
 453  453          else dup c@ [char] v = if
 454  454            s" set boot_verbose=YES" evaluate TRUE
 455  455          else dup c@ [char] k = if
 456  456            s" set boot_kmdb=YES" evaluate TRUE
 457  457          else dup c@ [char] d = if
 458      -          s" set boot_debug=YES" evaluate TRUE
      458 +          s" set boot_drop_into_kmdb=YES" evaluate TRUE
 459  459          else dup c@ [char] r = if
 460  460            s" set boot_reconfigure=YES" evaluate TRUE
 461  461          else dup c@ [char] a = if
 462  462            s" set boot_ask=YES" evaluate TRUE
 463  463          then then then then then then
 464  464          dup TRUE = if
 465  465            drop
 466  466            dup >r                ( addr len len' addr' R: addr' )
 467  467            1+ swap 1-            ( addr len addr'+1 len'-1 R: addr' )
 468  468            r> swap move          ( addr len )
↓ open down ↓ 167 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX