Before this change, stepping and other gdb command handlers use 'gud-display-line’ and 'gdb-goto-breakpoint' uses 'gdb-display-source-buffer'. Now whenever gdb-mi code tries to open a source buffer, 'gdb-display-source-buffer’ is used. Also, we simplify the logic in 'gdb-display-source-buffer’ and add a feature to limit the maximum number of source windows. From a user’s perspective, this change solves two problems: 1. The behavior difference between jumping to break point and stepping (and other command) 2. Gdb-mi opening more windows than I wanted for displaying source files. Yuan