Hi Lianbo, -----Original Message----- > >> diff --git a/defs.h b/defs.h > >> index 7d386d2..ed2f5ca 100644 > >> --- a/defs.h > >> +++ b/defs.h > >> @@ -1768,6 +1768,8 @@ struct offset_table { /* stash of commonly-used offsets */ > >> long vcpu_struct_rq; > >> long task_struct_sched_info; > >> long sched_info_last_arrival; > >> + long task_struct_sched_entity; > >> + long se_exec_start; > > > > > > This can be only appended to the end of the offset_table. > > For more details, refer to the section "writing patches" in wiki: > > https://github.com/crash-utility/crash/wiki Seeing this exchange and thought of something like this: --- a/defs.h +++ b/defs.h @@ -1215,8 +1215,8 @@ struct reference { void *refp; }; -struct offset_table { /* stash of commonly-used offsets */ - long list_head_next; /* add new entries to end of table */ +struct offset_table { /* NOTE: add new entries to end of table [1] */ + long list_head_next; /* [1] https://github.com/crash-utility/crash/wiki */ long list_head_prev; long task_struct_pid; long task_struct_state; With this patch, a patch trying to add an entry to the middle of the table: diff --git a/defs.h b/defs.h index 938e39ca4baf..c0814482abaa 100644 --- a/defs.h +++ b/defs.h @@ -2007,6 +2007,7 @@ struct offset_table { /* NOTE: add new entries to end of table [1] */ long mm_struct_mm_count; long task_struct_thread_reg29; long task_struct_thread_reg31; + long foo_bar; long pt_regs_regs; long pt_regs_cp0_badvaddr; long address_space_page_tree; Having this even only for the offset_table, size_table and array_table might be effective to let developers notice that rule. What do you think? Attached a patch. Thanks, Kazu
Attachment:
0001-defs.h-Add-note-on-adding-entries-to-end-of-table.patch
Description: 0001-defs.h-Add-note-on-adding-entries-to-end-of-table.patch
-- Crash-utility mailing list Crash-utility@xxxxxxxxxx https://listman.redhat.com/mailman/listinfo/crash-utility