11751 mdb refuses to use version 4 mdb modules after 10859 Contributed by: Gordon Ross <gwr@nexenta.com>

Review Request #2355 — Created Sept. 29, 2019 and submitted

tsoome
illumos-gate
11751
8ff0b79...
general
11751 mdb refuses to use version 4 mdb modules after 10859 Contributed by: Gordon Ross <gwr@nexenta.com>


  • 0
  • 0
  • 1
  • 0
  • 1
Description From Last Updated
igork
  1. Ship It!
  2. 
      
citrus
  1. Ship It!
  2. 
      
andy_js
  1. Ship It!
  2. 
      
andy_js
  1. 
      
  2. usr/src/cmd/mdb/common/mdb/mdb_module.c (Diff revision 1)
     
     
    Maybe it would be a good idea to have some kind of compile-time assert to check MDB_API_VERSION hasn't changed?
    1. But what if it was legitimate change?

    2. Then update the code and the assert together.

  3. 
      
tsoome
jlevon
  1. Ship It!
  2. 
      
gwr
  1. 
      
  2. usr/src/cmd/mdb/common/mdb/mdb_debug.h (Diff revision 2)
     
     

    This may "open a can of worms".
    The macros in sys/debug.h use
    assfail() or assfail3().
    Are those "the right thing" in mdb?
    Even if so, I'm concerned about what else might be affected by this change.

    Also, the CTASSERT macro is not really needed for this fix.
    (see my next comment).

    1. oh right, I have to admit, I totally did forgot about #error. thanks.

  3. usr/src/cmd/mdb/common/mdb/mdb_module.c (Diff revision 2)
     
     

    You really don't need CTASSERT in debug.h for this.
    You could just as easily do:

    #if MDB_API_VERSION != 5
    #error "need attention here"
    #endif
    

    "Keep it simple" :)

  4. 
      
tsoome
andy_js
  1. Ship It!
  2. 
      
gwr
  1. Looks good. Thanks.

  2. 
      
jlevon
  1. Ship It!
  2. 
      
tsoome
Review request changed

Status: Closed (submitted)

Loading...