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
Information | |
---|---|
tsoome | |
illumos-gate | |
11751 | |
8ff0b79... | |
Reviewers | |
general | |
11751 mdb refuses to use version 4 mdb modules after 10859 Contributed by: Gordon Ross <gwr@nexenta.com>
-
-
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?
Change Summary:
Add compile time assert to guard the API version. Enable the use of sys/debug.h so we can use CTASSERT().
Commit: |
|
||||
---|---|---|---|---|---|
Diff: |
Revision 2 (+4 -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). -
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" :)
Commit: |
|
||||
---|---|---|---|---|---|
Diff: |
Revision 3 (+4) |