[nemiver/follow-fork-mode: 21/35] Initial front end support of mixed asm/src mode
- From: Dodji Seketeli <dodji src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [nemiver/follow-fork-mode: 21/35] Initial front end support of mixed asm/src mode
- Date: Thu, 6 May 2010 10:17:51 +0000 (UTC)
commit c3f40b7b59dc629fc84a198b93bf278697cfed47
Author: Dodji Seketeli <dodji redhat com>
Date: Sun Apr 25 16:42:29 2010 +0200
Initial front end support of mixed asm/src mode
* src/persp/dbgperspective/glade/preferencesdialog.glade: Add
debugger preferences: Asm style, nb of instrs to disasm and path
to debugger.
* src/persp/dbgperspective/nmv-conf-keys.h (CONF_KEY_ASM_STYLE_PURE,
CONF_KEY_GDB_BINARY, CONF_KEY_DEFAULT_NUM_ASM_INSTRS): Declare
new GCONF keys.
* src/persp/dbgperspective/nmv-dbg-perspective.h
(DGBPerspective::load_asm): Update for the IDebugger::AsmInstr to
IDebugger::Asm switch.
* src/persp/dbgperspective/nmv-dbg-perspective.cc
(DBG_PERSPECTIVE_ASM_DOMAIN): Define new logging domain for asm
stuff.
(CONF_KEY_ASM_STYLE_PURE, CONF_KEY_DEFAULT_NUM_ASM_INSTRS):
define new gconf keys.
(log_asm_insns): New function to dump asm insns being slammed
into a source buffer.
(DBGPerspective::on_debugger_asm_signal1,
DBGPerspective::on_debugger_asm_signal2,
DBGPerspective::on_debugger_asm_signal3,
DBGPerspective::on_debugger_asm_signal4,
DBGPerspective::load_asm,
DBGPerspective::open_asm,
DBGPerspective::switch_to_asm,
DBGPerspective::add_asm): Update for the IDebugger::AsmInstr to
IDebugger::Asm switch.
(DBGPerspective::on_conf_key_changed_signal): Listen to changes
of the value of GConf keys CONF_KEY_DEFAULT_NUM_ASM_INSTRS and
CONF_KEY_ASM_STYLE_PURE.
(DBGPerspective::append_source_editor): Monitor only the changes
of source type buffers, because asm type buffers' content don't
come from an on-disk file.
(DBGPerspective::read_default_config): Read the value of GConf
keys CONF_KEY_DEFAULT_NUM_ASM_INSTRS, CONF_KEY_ASM_STYLE_PURE.
(write_asm_instr): New fn.
(DBGPerspective::disassemble_and_do,
DBGPerspective::disassemble_around_address_and_do): Fetch at least
N asm instructions. N being the value of the gconf key
CONF_KEY_DEFAULT_NUM_ASM_INSTRS. Call the debugger engine
disassembler with the right asm style (pure asm or mixed
src/asm), depending on the value of the CONF_KEY_ASM_STYLE_PURE
key.
* src/persp/dbgperspective/nmv-preferences-dialog.cc
(PreferencesDialog::Priv::on_asm_style_toggled_signal,
PreferencesDialog::Priv::on_num_asms_value_changed_signal,
PreferencesDialog::Priv::on_gdb_binary_file_set_signal): New
signal handlers.
(PreferencesDialog::Priv::init): Add some comments.
Initialize the value of the pure/mixed asm radio buttons, the
debfault num asm instrs spin button and the gdb binary path
chooser button.
(PreferencesDialog::Priv::update_asm_style_keys,
PreferencesDialog::Priv::update_default_num_asm_instrs_key,
PreferencesDialog::Priv::update_gdb_binary_key,
PreferencesDialog::Priv::update_widget_from_debugger_keys): New fns.
(PreferencesDialog::Priv::update_widget_from_conf): Call
PreferencesDialog::Priv::update_widget_from_debugger_keys.
* src/persp/dbgperspective/schemas/nemiver-dbgperspective.schemas:
Add new keys: /apps/nemiver/dbgperspective/asm-style-pure,
and /apps/nemiver/dbgperspective/default-num-asm-instrs.
.../dbgperspective/glade/preferencesdialog.glade | 1632 ++++++++++++++------
src/persp/dbgperspective/nmv-conf-keys.h | 4 +-
src/persp/dbgperspective/nmv-dbg-perspective.cc | 151 ++-
src/persp/dbgperspective/nmv-dbg-perspective.h | 2 +-
src/persp/dbgperspective/nmv-preferences-dialog.cc | 154 ++-
.../schemas/nemiver-dbgperspective.schemas | 23 +
6 files changed, 1439 insertions(+), 527 deletions(-)
---
diff --git a/src/persp/dbgperspective/glade/preferencesdialog.glade b/src/persp/dbgperspective/glade/preferencesdialog.glade
index d5f53b3..2248cd2 100644
--- a/src/persp/dbgperspective/glade/preferencesdialog.glade
+++ b/src/persp/dbgperspective/glade/preferencesdialog.glade
@@ -1,484 +1,1152 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<!DOCTYPE glade-interface SYSTEM "glade-2.0.dtd">
-<!--*- mode: xml -*-->
+<?xml version="1.0" standalone="no"?> <!--*- mode: xml -*-->
+<!DOCTYPE glade-interface SYSTEM "http://glade.gnome.org/glade-2.0.dtd">
+
<glade-interface>
- <widget class="GtkDialog" id="preferencesdialog">
- <property name="visible">True</property>
- <property name="title" translatable="yes">Preferences</property>
- <property name="default_width">400</property>
- <property name="default_height">300</property>
- <property name="type_hint">GDK_WINDOW_TYPE_HINT_DIALOG</property>
- <property name="skip_taskbar_hint">True</property>
- <property name="has_separator">False</property>
- <child internal-child="vbox">
- <widget class="GtkVBox" id="dialog-vbox1">
- <property name="visible">True</property>
- <child>
- <widget class="GtkNotebook" id="rootnotebook">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="border_width">6</property>
- <child>
- <widget class="GtkVBox" id="vbox3">
- <property name="visible">True</property>
- <property name="border_width">6</property>
- <property name="spacing">12</property>
- <child>
- <widget class="GtkFrame" id="frame3">
- <property name="visible">True</property>
- <property name="label_xalign">0</property>
- <property name="shadow_type">GTK_SHADOW_NONE</property>
- <child>
- <widget class="GtkAlignment" id="alignment3">
- <property name="visible">True</property>
- <property name="top_padding">6</property>
- <property name="left_padding">12</property>
- <child>
- <widget class="GtkVBox" id="vbox4">
- <property name="visible">True</property>
- <property name="spacing">6</property>
- <child>
- <widget class="GtkCheckButton" id="systemfontcheckbutton">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="label" translatable="yes">Use system monospace font</property>
- <property name="use_underline">True</property>
- <property name="response_id">0</property>
- <property name="active">True</property>
- <property name="draw_indicator">True</property>
- </widget>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
- <child>
- <widget class="GtkHBox" id="customfonthbox">
- <property name="visible">True</property>
- <property name="sensitive">False</property>
- <property name="spacing">6</property>
- <child>
- <widget class="GtkLabel" id="label7">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Custom Font:</property>
- </widget>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
- <child>
- <widget class="GtkFontButton" id="customfontfontbutton">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="response_id">0</property>
- </widget>
- <packing>
- <property name="position">1</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="position">1</property>
- </packing>
- </child>
- </widget>
- </child>
- </widget>
- </child>
- <child>
- <widget class="GtkLabel" id="label6">
- <property name="visible">True</property>
- <property name="label" translatable="yes"><b>Editor Font</b></property>
- <property name="use_markup">True</property>
- </widget>
- <packing>
- <property name="type">label_item</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
- <child>
- <widget class="GtkFrame" id="frame5">
- <property name="visible">True</property>
- <property name="label_xalign">0</property>
- <property name="shadow_type">GTK_SHADOW_NONE</property>
- <child>
- <widget class="GtkAlignment" id="alignment6">
- <property name="visible">True</property>
- <property name="top_padding">6</property>
- <property name="left_padding">12</property>
- <child>
- <widget class="GtkComboBox" id="editorstylecombobox">
- <property name="visible">True</property>
- </widget>
- </child>
- </widget>
- </child>
- <child>
- <widget class="GtkLabel" id="label2">
- <property name="visible">True</property>
- <property name="label" translatable="yes"><b>Visual Style</b></property>
- <property name="use_markup">True</property>
- </widget>
- <packing>
- <property name="type">label_item</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="position">1</property>
- </packing>
- </child>
- <child>
- <widget class="GtkFrame" id="frame1">
- <property name="visible">True</property>
- <property name="label_xalign">0</property>
- <property name="shadow_type">GTK_SHADOW_NONE</property>
- <child>
- <widget class="GtkAlignment" id="alignment1">
- <property name="visible">True</property>
- <property name="top_padding">6</property>
- <property name="left_padding">12</property>
- <child>
- <widget class="GtkCheckButton" id="showlinescheckbutton">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="label" translatable="yes">Display line numbers</property>
- <property name="use_underline">True</property>
- <property name="response_id">0</property>
- <property name="active">True</property>
- <property name="draw_indicator">True</property>
- </widget>
- </child>
- </widget>
- </child>
- <child>
- <widget class="GtkLabel" id="label4">
- <property name="visible">True</property>
- <property name="label" translatable="yes"><b>Line Numbers</b></property>
- <property name="use_markup">True</property>
- </widget>
- <packing>
- <property name="type">label_item</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="position">2</property>
- </packing>
- </child>
- <child>
- <widget class="GtkFrame" id="frame2">
- <property name="visible">True</property>
- <property name="label_xalign">0</property>
- <property name="shadow_type">GTK_SHADOW_NONE</property>
- <child>
- <widget class="GtkAlignment" id="alignment2">
- <property name="visible">True</property>
- <property name="top_padding">6</property>
- <property name="left_padding">12</property>
- <child>
- <widget class="GtkCheckButton" id="highlightsourcecheckbutton">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="label" translatable="yes">Enable syntax highlighting</property>
- <property name="use_underline">True</property>
- <property name="response_id">0</property>
- <property name="active">True</property>
- <property name="draw_indicator">True</property>
- </widget>
- </child>
- </widget>
- </child>
- <child>
- <widget class="GtkLabel" id="label5">
- <property name="visible">True</property>
- <property name="label" translatable="yes"><b>Syntax Highlighting</b></property>
- <property name="use_markup">True</property>
- </widget>
- <packing>
- <property name="type">label_item</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="position">3</property>
- </packing>
- </child>
- <child>
- <widget class="GtkFrame" id="frame6">
- <property name="visible">True</property>
- <property name="label_xalign">0</property>
- <property name="shadow_type">GTK_SHADOW_NONE</property>
- <child>
- <widget class="GtkAlignment" id="alignment7">
- <property name="visible">True</property>
- <property name="top_padding">6</property>
- <property name="left_padding">12</property>
- <child>
- <widget class="GtkCheckButton" id="launchterminalcheckbutton">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="label" translatable="yes">Use launch terminal</property>
- <property name="use_underline">True</property>
- <property name="response_id">0</property>
- <property name="active">False</property>
- <property name="draw_indicator">True</property>
- </widget>
- </child>
- </widget>
- </child>
- <child>
- <widget class="GtkLabel" id="label10">
- <property name="visible">True</property>
- <property name="label" translatable="yes"><b>Terminal</b></property>
- <property name="use_markup">True</property>
- </widget>
- <packing>
- <property name="type">label_item</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="position">3</property>
- </packing>
- </child>
- <child>
- <widget class="GtkFrame" id="frame4">
- <property name="visible">True</property>
- <property name="label_xalign">0</property>
- <property name="shadow_type">GTK_SHADOW_NONE</property>
- <child>
- <widget class="GtkAlignment" id="alignment4">
- <property name="visible">True</property>
- <property name="top_padding">6</property>
- <property name="left_padding">12</property>
- <child>
- <widget class="GtkVBox" id="vbox5">
- <property name="visible">True</property>
- <child>
- <widget class="GtkLabel" id="label9">
- <property name="visible">True</property>
- <property name="xalign">0</property>
- <property name="label" translatable="yes">When a source file is changed:</property>
- </widget>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
- <child>
- <widget class="GtkAlignment" id="alignment5">
- <property name="visible">True</property>
- <property name="top_padding">6</property>
- <property name="left_padding">6</property>
- <child>
- <widget class="GtkVBox" id="vbox6">
- <property name="visible">True</property>
- <child>
- <widget class="GtkRadioButton" id="reloadradiobutton">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="label" translatable="yes">Reload the file</property>
- <property name="use_underline">True</property>
- <property name="response_id">0</property>
- <property name="draw_indicator">True</property>
- </widget>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
- <child>
- <widget class="GtkRadioButton" id="neverreloadradiobutton">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="label" translatable="yes">Do not reload the file</property>
- <property name="use_underline">True</property>
- <property name="response_id">0</property>
- <property name="draw_indicator">True</property>
- <property name="group">reloadradiobutton</property>
- </widget>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="position">1</property>
- </packing>
- </child>
- <child>
- <widget class="GtkRadioButton" id="confirmreloadradiobutton">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="label" translatable="yes">Ask each time</property>
- <property name="use_underline">True</property>
- <property name="response_id">0</property>
- <property name="draw_indicator">True</property>
- <property name="group">reloadradiobutton</property>
- </widget>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="position">2</property>
- </packing>
- </child>
- </widget>
- </child>
- </widget>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="position">1</property>
- </packing>
- </child>
- </widget>
- </child>
- </widget>
- </child>
- <child>
- <widget class="GtkLabel" id="label8">
- <property name="visible">True</property>
- <property name="label" translatable="yes"><b>File Monitoring</b></property>
- <property name="use_markup">True</property>
- </widget>
- <packing>
- <property name="type">label_item</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="position">4</property>
- </packing>
- </child>
- </widget>
- </child>
- <child>
- <widget class="GtkLabel" id="label3">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Editor</property>
- </widget>
- <packing>
- <property name="type">tab</property>
- <property name="tab_fill">False</property>
- </packing>
- </child>
- <child>
- <widget class="GtkVBox" id="vbox1">
- <property name="visible">True</property>
- <property name="border_width">6</property>
- <child>
- <widget class="GtkHBox" id="hbox1">
- <property name="visible">True</property>
- <property name="spacing">6</property>
- <child>
- <widget class="GtkScrolledWindow" id="scrolledwindow1">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="hscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
- <property name="vscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
- <property name="shadow_type">GTK_SHADOW_IN</property>
- <child>
- <widget class="GtkTreeView" id="dirstreeview">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- </widget>
- </child>
- </widget>
- </child>
- <child>
- <widget class="GtkVBox" id="vbox2">
- <property name="visible">True</property>
- <property name="spacing">6</property>
- <child>
- <widget class="GtkButton" id="adddirbutton">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="label">gtk-add</property>
- <property name="use_stock">True</property>
- <property name="response_id">0</property>
- </widget>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
- <child>
- <widget class="GtkButton" id="suppressdirbutton">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="label">gtk-remove</property>
- <property name="use_stock">True</property>
- <property name="response_id">0</property>
- </widget>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="position">1</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="position">1</property>
- </packing>
- </child>
- </widget>
- </child>
- </widget>
- <packing>
- <property name="position">1</property>
- </packing>
- </child>
- <child>
- <widget class="GtkLabel" id="label1">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Source Directories</property>
- </widget>
- <packing>
- <property name="type">tab</property>
- <property name="position">1</property>
- <property name="tab_fill">False</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="position">1</property>
- </packing>
- </child>
- <child internal-child="action_area">
- <widget class="GtkHButtonBox" id="dialog-action_area1">
- <property name="visible">True</property>
- <property name="layout_style">GTK_BUTTONBOX_END</property>
- <child>
- <widget class="GtkButton" id="okbutton1">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="can_default">True</property>
- <property name="label">gtk-close</property>
- <property name="use_stock">True</property>
- <property name="response_id">-7</property>
- </widget>
- </child>
- </widget>
- <packing>
- <property name="expand">False</property>
- <property name="pack_type">GTK_PACK_END</property>
- </packing>
- </child>
- </widget>
- </child>
- </widget>
+
+<widget class="GtkDialog" id="preferencesdialog">
+ <property name="visible">True</property>
+ <property name="title" translatable="yes">Preferences</property>
+ <property name="type">GTK_WINDOW_TOPLEVEL</property>
+ <property name="window_position">GTK_WIN_POS_NONE</property>
+ <property name="modal">False</property>
+ <property name="default_width">400</property>
+ <property name="default_height">300</property>
+ <property name="resizable">True</property>
+ <property name="destroy_with_parent">False</property>
+ <property name="decorated">True</property>
+ <property name="skip_taskbar_hint">True</property>
+ <property name="skip_pager_hint">False</property>
+ <property name="type_hint">GDK_WINDOW_TYPE_HINT_DIALOG</property>
+ <property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
+ <property name="focus_on_map">True</property>
+ <property name="urgency_hint">False</property>
+ <property name="has_separator">False</property>
+
+ <child internal-child="vbox">
+ <widget class="GtkVBox" id="dialog-vbox1">
+ <property name="visible">True</property>
+ <property name="homogeneous">False</property>
+ <property name="spacing">0</property>
+
+ <child internal-child="action_area">
+ <widget class="GtkHButtonBox" id="dialog-action_area1">
+ <property name="visible">True</property>
+ <property name="layout_style">GTK_BUTTONBOX_END</property>
+
+ <child>
+ <widget class="GtkButton" id="okbutton1">
+ <property name="visible">True</property>
+ <property name="can_default">True</property>
+ <property name="can_focus">True</property>
+ <property name="label">gtk-close</property>
+ <property name="use_stock">True</property>
+ <property name="relief">GTK_RELIEF_NORMAL</property>
+ <property name="focus_on_click">True</property>
+ <property name="response_id">-7</property>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="pack_type">GTK_PACK_END</property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkNotebook" id="rootnotebook">
+ <property name="border_width">6</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="show_tabs">True</property>
+ <property name="show_border">True</property>
+ <property name="tab_pos">GTK_POS_TOP</property>
+ <property name="scrollable">False</property>
+ <property name="enable_popup">False</property>
+
+ <child>
+ <widget class="GtkVBox" id="vbox3">
+ <property name="border_width">6</property>
+ <property name="visible">True</property>
+ <property name="homogeneous">False</property>
+ <property name="spacing">12</property>
+
+ <child>
+ <widget class="GtkFrame" id="frame3">
+ <property name="visible">True</property>
+ <property name="label_xalign">0</property>
+ <property name="label_yalign">0.5</property>
+ <property name="shadow_type">GTK_SHADOW_NONE</property>
+
+ <child>
+ <widget class="GtkAlignment" id="alignment3">
+ <property name="visible">True</property>
+ <property name="xalign">0.5</property>
+ <property name="yalign">0.5</property>
+ <property name="xscale">1</property>
+ <property name="yscale">1</property>
+ <property name="top_padding">6</property>
+ <property name="bottom_padding">0</property>
+ <property name="left_padding">12</property>
+ <property name="right_padding">0</property>
+
+ <child>
+ <widget class="GtkVBox" id="vbox4">
+ <property name="visible">True</property>
+ <property name="homogeneous">False</property>
+ <property name="spacing">6</property>
+
+ <child>
+ <widget class="GtkCheckButton" id="systemfontcheckbutton">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="label" translatable="yes">Use system monospace font</property>
+ <property name="use_underline">True</property>
+ <property name="relief">GTK_RELIEF_NORMAL</property>
+ <property name="focus_on_click">True</property>
+ <property name="active">True</property>
+ <property name="inconsistent">False</property>
+ <property name="draw_indicator">True</property>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkHBox" id="customfonthbox">
+ <property name="visible">True</property>
+ <property name="sensitive">False</property>
+ <property name="homogeneous">False</property>
+ <property name="spacing">6</property>
+
+ <child>
+ <widget class="GtkLabel" id="label7">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">Custom Font:</property>
+ <property name="use_underline">False</property>
+ <property name="use_markup">False</property>
+ <property name="justify">GTK_JUSTIFY_LEFT</property>
+ <property name="wrap">False</property>
+ <property name="selectable">False</property>
+ <property name="xalign">0.5</property>
+ <property name="yalign">0.5</property>
+ <property name="xpad">0</property>
+ <property name="ypad">0</property>
+ <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+ <property name="width_chars">-1</property>
+ <property name="single_line_mode">False</property>
+ <property name="angle">0</property>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkFontButton" id="customfontfontbutton">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="show_style">True</property>
+ <property name="show_size">True</property>
+ <property name="use_font">False</property>
+ <property name="use_size">False</property>
+ <property name="focus_on_click">True</property>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ </child>
+
+ <child>
+ <widget class="GtkLabel" id="label6">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes"><b>Editor Font</b></property>
+ <property name="use_underline">False</property>
+ <property name="use_markup">True</property>
+ <property name="justify">GTK_JUSTIFY_LEFT</property>
+ <property name="wrap">False</property>
+ <property name="selectable">False</property>
+ <property name="xalign">0.5</property>
+ <property name="yalign">0.5</property>
+ <property name="xpad">0</property>
+ <property name="ypad">0</property>
+ <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+ <property name="width_chars">-1</property>
+ <property name="single_line_mode">False</property>
+ <property name="angle">0</property>
+ </widget>
+ <packing>
+ <property name="type">label_item</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkFrame" id="frame5">
+ <property name="visible">True</property>
+ <property name="label_xalign">0</property>
+ <property name="label_yalign">0.5</property>
+ <property name="shadow_type">GTK_SHADOW_NONE</property>
+
+ <child>
+ <widget class="GtkAlignment" id="alignment6">
+ <property name="visible">True</property>
+ <property name="xalign">0.5</property>
+ <property name="yalign">0.5</property>
+ <property name="xscale">1</property>
+ <property name="yscale">1</property>
+ <property name="top_padding">6</property>
+ <property name="bottom_padding">0</property>
+ <property name="left_padding">12</property>
+ <property name="right_padding">0</property>
+
+ <child>
+ <widget class="GtkComboBox" id="editorstylecombobox">
+ <property name="visible">True</property>
+ <property name="add_tearoffs">False</property>
+ <property name="focus_on_click">True</property>
+ </widget>
+ </child>
+ </widget>
+ </child>
+
+ <child>
+ <widget class="GtkLabel" id="label2">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes"><b>Visual Style</b></property>
+ <property name="use_underline">False</property>
+ <property name="use_markup">True</property>
+ <property name="justify">GTK_JUSTIFY_LEFT</property>
+ <property name="wrap">False</property>
+ <property name="selectable">False</property>
+ <property name="xalign">0.5</property>
+ <property name="yalign">0.5</property>
+ <property name="xpad">0</property>
+ <property name="ypad">0</property>
+ <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+ <property name="width_chars">-1</property>
+ <property name="single_line_mode">False</property>
+ <property name="angle">0</property>
+ </widget>
+ <packing>
+ <property name="type">label_item</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkFrame" id="frame1">
+ <property name="visible">True</property>
+ <property name="label_xalign">0</property>
+ <property name="label_yalign">0.5</property>
+ <property name="shadow_type">GTK_SHADOW_NONE</property>
+
+ <child>
+ <widget class="GtkAlignment" id="alignment1">
+ <property name="visible">True</property>
+ <property name="xalign">0.5</property>
+ <property name="yalign">0.5</property>
+ <property name="xscale">1</property>
+ <property name="yscale">1</property>
+ <property name="top_padding">6</property>
+ <property name="bottom_padding">0</property>
+ <property name="left_padding">12</property>
+ <property name="right_padding">0</property>
+
+ <child>
+ <widget class="GtkCheckButton" id="showlinescheckbutton">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="label" translatable="yes">Display line numbers</property>
+ <property name="use_underline">True</property>
+ <property name="relief">GTK_RELIEF_NORMAL</property>
+ <property name="focus_on_click">True</property>
+ <property name="active">True</property>
+ <property name="inconsistent">False</property>
+ <property name="draw_indicator">True</property>
+ </widget>
+ </child>
+ </widget>
+ </child>
+
+ <child>
+ <widget class="GtkLabel" id="label4">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes"><b>Line Numbers</b></property>
+ <property name="use_underline">False</property>
+ <property name="use_markup">True</property>
+ <property name="justify">GTK_JUSTIFY_LEFT</property>
+ <property name="wrap">False</property>
+ <property name="selectable">False</property>
+ <property name="xalign">0.5</property>
+ <property name="yalign">0.5</property>
+ <property name="xpad">0</property>
+ <property name="ypad">0</property>
+ <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+ <property name="width_chars">-1</property>
+ <property name="single_line_mode">False</property>
+ <property name="angle">0</property>
+ </widget>
+ <packing>
+ <property name="type">label_item</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkFrame" id="frame6">
+ <property name="visible">True</property>
+ <property name="label_xalign">0</property>
+ <property name="label_yalign">0.5</property>
+ <property name="shadow_type">GTK_SHADOW_NONE</property>
+
+ <child>
+ <widget class="GtkAlignment" id="alignment7">
+ <property name="visible">True</property>
+ <property name="xalign">0.5</property>
+ <property name="yalign">0.5</property>
+ <property name="xscale">1</property>
+ <property name="yscale">1</property>
+ <property name="top_padding">6</property>
+ <property name="bottom_padding">0</property>
+ <property name="left_padding">12</property>
+ <property name="right_padding">0</property>
+
+ <child>
+ <widget class="GtkCheckButton" id="launchterminalcheckbutton">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="label" translatable="yes">Use launch terminal</property>
+ <property name="use_underline">True</property>
+ <property name="relief">GTK_RELIEF_NORMAL</property>
+ <property name="focus_on_click">True</property>
+ <property name="active">False</property>
+ <property name="inconsistent">False</property>
+ <property name="draw_indicator">True</property>
+ </widget>
+ </child>
+ </widget>
+ </child>
+
+ <child>
+ <widget class="GtkLabel" id="label10">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes"><b>Terminal</b></property>
+ <property name="use_underline">False</property>
+ <property name="use_markup">True</property>
+ <property name="justify">GTK_JUSTIFY_LEFT</property>
+ <property name="wrap">False</property>
+ <property name="selectable">False</property>
+ <property name="xalign">0.5</property>
+ <property name="yalign">0.5</property>
+ <property name="xpad">0</property>
+ <property name="ypad">0</property>
+ <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+ <property name="width_chars">-1</property>
+ <property name="single_line_mode">False</property>
+ <property name="angle">0</property>
+ </widget>
+ <packing>
+ <property name="type">label_item</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkFrame" id="frame4">
+ <property name="visible">True</property>
+ <property name="label_xalign">0</property>
+ <property name="label_yalign">0.5</property>
+ <property name="shadow_type">GTK_SHADOW_NONE</property>
+
+ <child>
+ <widget class="GtkAlignment" id="alignment4">
+ <property name="visible">True</property>
+ <property name="xalign">0.5</property>
+ <property name="yalign">0.5</property>
+ <property name="xscale">1</property>
+ <property name="yscale">1</property>
+ <property name="top_padding">6</property>
+ <property name="bottom_padding">0</property>
+ <property name="left_padding">12</property>
+ <property name="right_padding">0</property>
+
+ <child>
+ <widget class="GtkVBox" id="vbox5">
+ <property name="visible">True</property>
+ <property name="homogeneous">False</property>
+ <property name="spacing">0</property>
+
+ <child>
+ <widget class="GtkLabel" id="label9">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">When a source file is changed:</property>
+ <property name="use_underline">False</property>
+ <property name="use_markup">False</property>
+ <property name="justify">GTK_JUSTIFY_LEFT</property>
+ <property name="wrap">False</property>
+ <property name="selectable">False</property>
+ <property name="xalign">0</property>
+ <property name="yalign">0.5</property>
+ <property name="xpad">0</property>
+ <property name="ypad">0</property>
+ <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+ <property name="width_chars">-1</property>
+ <property name="single_line_mode">False</property>
+ <property name="angle">0</property>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkAlignment" id="alignment5">
+ <property name="visible">True</property>
+ <property name="xalign">0.5</property>
+ <property name="yalign">0.5</property>
+ <property name="xscale">1</property>
+ <property name="yscale">1</property>
+ <property name="top_padding">6</property>
+ <property name="bottom_padding">0</property>
+ <property name="left_padding">6</property>
+ <property name="right_padding">0</property>
+
+ <child>
+ <widget class="GtkVBox" id="vbox6">
+ <property name="visible">True</property>
+ <property name="homogeneous">False</property>
+ <property name="spacing">0</property>
+
+ <child>
+ <widget class="GtkRadioButton" id="reloadradiobutton">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="label" translatable="yes">Reload the file</property>
+ <property name="use_underline">True</property>
+ <property name="relief">GTK_RELIEF_NORMAL</property>
+ <property name="focus_on_click">True</property>
+ <property name="active">False</property>
+ <property name="inconsistent">False</property>
+ <property name="draw_indicator">True</property>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkRadioButton" id="neverreloadradiobutton">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="label" translatable="yes">Do not reload the file</property>
+ <property name="use_underline">True</property>
+ <property name="relief">GTK_RELIEF_NORMAL</property>
+ <property name="focus_on_click">True</property>
+ <property name="active">False</property>
+ <property name="inconsistent">False</property>
+ <property name="draw_indicator">True</property>
+ <property name="group">reloadradiobutton</property>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkRadioButton" id="confirmreloadradiobutton">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="label" translatable="yes">Ask each time</property>
+ <property name="use_underline">True</property>
+ <property name="relief">GTK_RELIEF_NORMAL</property>
+ <property name="focus_on_click">True</property>
+ <property name="active">False</property>
+ <property name="inconsistent">False</property>
+ <property name="draw_indicator">True</property>
+ <property name="group">reloadradiobutton</property>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ </child>
+
+ <child>
+ <widget class="GtkLabel" id="label8">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes"><b>File Monitoring</b></property>
+ <property name="use_underline">False</property>
+ <property name="use_markup">True</property>
+ <property name="justify">GTK_JUSTIFY_LEFT</property>
+ <property name="wrap">False</property>
+ <property name="selectable">False</property>
+ <property name="xalign">0.5</property>
+ <property name="yalign">0.5</property>
+ <property name="xpad">0</property>
+ <property name="ypad">0</property>
+ <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+ <property name="width_chars">-1</property>
+ <property name="single_line_mode">False</property>
+ <property name="angle">0</property>
+ </widget>
+ <packing>
+ <property name="type">label_item</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkFrame" id="frame2">
+ <property name="visible">True</property>
+ <property name="label_xalign">0</property>
+ <property name="label_yalign">0.5</property>
+ <property name="shadow_type">GTK_SHADOW_NONE</property>
+
+ <child>
+ <widget class="GtkAlignment" id="alignment2">
+ <property name="visible">True</property>
+ <property name="xalign">0.5</property>
+ <property name="yalign">0.5</property>
+ <property name="xscale">1</property>
+ <property name="yscale">1</property>
+ <property name="top_padding">6</property>
+ <property name="bottom_padding">0</property>
+ <property name="left_padding">12</property>
+ <property name="right_padding">0</property>
+
+ <child>
+ <widget class="GtkCheckButton" id="highlightsourcecheckbutton">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="label" translatable="yes">Enable syntax highlighting</property>
+ <property name="use_underline">True</property>
+ <property name="relief">GTK_RELIEF_NORMAL</property>
+ <property name="focus_on_click">True</property>
+ <property name="active">True</property>
+ <property name="inconsistent">False</property>
+ <property name="draw_indicator">True</property>
+ </widget>
+ </child>
+ </widget>
+ </child>
+
+ <child>
+ <widget class="GtkLabel" id="label5">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes"><b>Syntax Highlighting</b></property>
+ <property name="use_underline">False</property>
+ <property name="use_markup">True</property>
+ <property name="justify">GTK_JUSTIFY_LEFT</property>
+ <property name="wrap">False</property>
+ <property name="selectable">False</property>
+ <property name="xalign">0.5</property>
+ <property name="yalign">0.5</property>
+ <property name="xpad">0</property>
+ <property name="ypad">0</property>
+ <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+ <property name="width_chars">-1</property>
+ <property name="single_line_mode">False</property>
+ <property name="angle">0</property>
+ </widget>
+ <packing>
+ <property name="type">label_item</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="tab_expand">False</property>
+ <property name="tab_fill">True</property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkLabel" id="label3">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">Editor</property>
+ <property name="use_underline">False</property>
+ <property name="use_markup">False</property>
+ <property name="justify">GTK_JUSTIFY_LEFT</property>
+ <property name="wrap">False</property>
+ <property name="selectable">False</property>
+ <property name="xalign">0.5</property>
+ <property name="yalign">0.5</property>
+ <property name="xpad">0</property>
+ <property name="ypad">0</property>
+ <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+ <property name="width_chars">-1</property>
+ <property name="single_line_mode">False</property>
+ <property name="angle">0</property>
+ </widget>
+ <packing>
+ <property name="type">tab</property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkVBox" id="vbox1">
+ <property name="border_width">6</property>
+ <property name="visible">True</property>
+ <property name="homogeneous">False</property>
+ <property name="spacing">0</property>
+
+ <child>
+ <widget class="GtkHBox" id="hbox1">
+ <property name="visible">True</property>
+ <property name="homogeneous">False</property>
+ <property name="spacing">6</property>
+
+ <child>
+ <widget class="GtkScrolledWindow" id="scrolledwindow1">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="hscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
+ <property name="vscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
+ <property name="shadow_type">GTK_SHADOW_IN</property>
+ <property name="window_placement">GTK_CORNER_TOP_LEFT</property>
+
+ <child>
+ <widget class="GtkTreeView" id="dirstreeview">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="headers_visible">True</property>
+ <property name="rules_hint">False</property>
+ <property name="reorderable">False</property>
+ <property name="enable_search">True</property>
+ <property name="fixed_height_mode">False</property>
+ <property name="hover_selection">False</property>
+ <property name="hover_expand">False</property>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkVBox" id="vbox2">
+ <property name="visible">True</property>
+ <property name="homogeneous">False</property>
+ <property name="spacing">6</property>
+
+ <child>
+ <widget class="GtkButton" id="adddirbutton">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="label">gtk-add</property>
+ <property name="use_stock">True</property>
+ <property name="relief">GTK_RELIEF_NORMAL</property>
+ <property name="focus_on_click">True</property>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkButton" id="suppressdirbutton">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="label">gtk-remove</property>
+ <property name="use_stock">True</property>
+ <property name="relief">GTK_RELIEF_NORMAL</property>
+ <property name="focus_on_click">True</property>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="tab_expand">False</property>
+ <property name="tab_fill">True</property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkLabel" id="label1">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">Source Directories</property>
+ <property name="use_underline">False</property>
+ <property name="use_markup">False</property>
+ <property name="justify">GTK_JUSTIFY_LEFT</property>
+ <property name="wrap">False</property>
+ <property name="selectable">False</property>
+ <property name="xalign">0.5</property>
+ <property name="yalign">0.5</property>
+ <property name="xpad">0</property>
+ <property name="ypad">0</property>
+ <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+ <property name="width_chars">-1</property>
+ <property name="single_line_mode">False</property>
+ <property name="angle">0</property>
+ </widget>
+ <packing>
+ <property name="type">tab</property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkVBox" id="vbox7">
+ <property name="border_width">6</property>
+ <property name="visible">True</property>
+ <property name="homogeneous">False</property>
+ <property name="spacing">12</property>
+
+ <child>
+ <widget class="GtkFrame" id="frame7">
+ <property name="visible">True</property>
+ <property name="label_xalign">0</property>
+ <property name="label_yalign">0.5</property>
+ <property name="shadow_type">GTK_SHADOW_NONE</property>
+
+ <child>
+ <widget class="GtkAlignment" id="alignment8">
+ <property name="visible">True</property>
+ <property name="xalign">0.5</property>
+ <property name="yalign">0.5</property>
+ <property name="xscale">1</property>
+ <property name="yscale">1</property>
+ <property name="top_padding">6</property>
+ <property name="bottom_padding">0</property>
+ <property name="left_padding">12</property>
+ <property name="right_padding">0</property>
+
+ <child>
+ <widget class="GtkVBox" id="vbox8">
+ <property name="visible">True</property>
+ <property name="homogeneous">False</property>
+ <property name="spacing">0</property>
+
+ <child>
+ <widget class="GtkRadioButton" id="pureasmradio">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="label" translatable="yes">Pure assembly</property>
+ <property name="use_underline">True</property>
+ <property name="relief">GTK_RELIEF_NORMAL</property>
+ <property name="focus_on_click">True</property>
+ <property name="active">False</property>
+ <property name="inconsistent">False</property>
+ <property name="draw_indicator">True</property>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkRadioButton" id="mixedasmradio">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="label" translatable="yes">Mixed source and assembly</property>
+ <property name="use_underline">True</property>
+ <property name="relief">GTK_RELIEF_NORMAL</property>
+ <property name="focus_on_click">True</property>
+ <property name="active">False</property>
+ <property name="inconsistent">False</property>
+ <property name="draw_indicator">True</property>
+ <property name="group">pureasmradio</property>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ </child>
+
+ <child>
+ <widget class="GtkLabel" id="label12">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes"><b>Assembly style</b></property>
+ <property name="use_underline">False</property>
+ <property name="use_markup">True</property>
+ <property name="justify">GTK_JUSTIFY_LEFT</property>
+ <property name="wrap">False</property>
+ <property name="selectable">False</property>
+ <property name="xalign">0.5</property>
+ <property name="yalign">0.5</property>
+ <property name="xpad">0</property>
+ <property name="ypad">0</property>
+ <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+ <property name="width_chars">-1</property>
+ <property name="single_line_mode">False</property>
+ <property name="angle">0</property>
+ </widget>
+ <packing>
+ <property name="type">label_item</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkFrame" id="frame8">
+ <property name="visible">True</property>
+ <property name="label_xalign">0</property>
+ <property name="label_yalign">0.5</property>
+ <property name="shadow_type">GTK_SHADOW_NONE</property>
+
+ <child>
+ <widget class="GtkAlignment" id="alignment9">
+ <property name="visible">True</property>
+ <property name="xalign">0.5</property>
+ <property name="yalign">0.5</property>
+ <property name="xscale">1</property>
+ <property name="yscale">1</property>
+ <property name="top_padding">6</property>
+ <property name="bottom_padding">0</property>
+ <property name="left_padding">12</property>
+ <property name="right_padding">0</property>
+
+ <child>
+ <widget class="GtkTable" id="table1">
+ <property name="visible">True</property>
+ <property name="n_rows">1</property>
+ <property name="n_columns">2</property>
+ <property name="homogeneous">False</property>
+ <property name="row_spacing">6</property>
+ <property name="column_spacing">6</property>
+
+ <child>
+ <widget class="GtkLabel" id="label14">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">Number of instructions to disassemble by default</property>
+ <property name="use_underline">False</property>
+ <property name="use_markup">False</property>
+ <property name="justify">GTK_JUSTIFY_LEFT</property>
+ <property name="wrap">False</property>
+ <property name="selectable">False</property>
+ <property name="xalign">0</property>
+ <property name="yalign">0.5</property>
+ <property name="xpad">0</property>
+ <property name="ypad">0</property>
+ <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+ <property name="width_chars">-1</property>
+ <property name="single_line_mode">False</property>
+ <property name="angle">0</property>
+ </widget>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="right_attach">2</property>
+ <property name="top_attach">0</property>
+ <property name="bottom_attach">1</property>
+ <property name="x_options">fill</property>
+ <property name="y_options"></property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkSpinButton" id="defaultnumasmspin">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="climb_rate">1</property>
+ <property name="digits">0</property>
+ <property name="numeric">True</property>
+ <property name="update_policy">GTK_UPDATE_ALWAYS</property>
+ <property name="snap_to_ticks">False</property>
+ <property name="wrap">False</property>
+ <property name="adjustment">25 1 2500 1 0 0</property>
+ </widget>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="right_attach">1</property>
+ <property name="top_attach">0</property>
+ <property name="bottom_attach">1</property>
+ <property name="x_options">fill</property>
+ <property name="y_options"></property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ </child>
+
+ <child>
+ <widget class="GtkLabel" id="label13">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes"><b>Instructions</b></property>
+ <property name="use_underline">False</property>
+ <property name="use_markup">True</property>
+ <property name="justify">GTK_JUSTIFY_LEFT</property>
+ <property name="wrap">False</property>
+ <property name="selectable">False</property>
+ <property name="xalign">0.5</property>
+ <property name="yalign">0.5</property>
+ <property name="xpad">0</property>
+ <property name="ypad">0</property>
+ <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+ <property name="width_chars">-1</property>
+ <property name="single_line_mode">False</property>
+ <property name="angle">0</property>
+ </widget>
+ <packing>
+ <property name="type">label_item</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkFrame" id="frame9">
+ <property name="visible">True</property>
+ <property name="label_xalign">0</property>
+ <property name="label_yalign">0.5</property>
+ <property name="shadow_type">GTK_SHADOW_NONE</property>
+
+ <child>
+ <widget class="GtkAlignment" id="alignment10">
+ <property name="visible">True</property>
+ <property name="xalign">0.5</property>
+ <property name="yalign">0.5</property>
+ <property name="xscale">1</property>
+ <property name="yscale">1</property>
+ <property name="top_padding">6</property>
+ <property name="bottom_padding">0</property>
+ <property name="left_padding">12</property>
+ <property name="right_padding">0</property>
+
+ <child>
+ <widget class="GtkTable" id="table2">
+ <property name="visible">True</property>
+ <property name="n_rows">1</property>
+ <property name="n_columns">2</property>
+ <property name="homogeneous">False</property>
+ <property name="row_spacing">0</property>
+ <property name="column_spacing">0</property>
+
+ <child>
+ <widget class="GtkFileChooserButton" id="pathtogdbfilechooser">
+ <property name="visible">True</property>
+ <property name="title" translatable="yes">Sélectionner un fichier</property>
+ <property name="action">GTK_FILE_CHOOSER_ACTION_OPEN</property>
+ <property name="local_only">True</property>
+ <property name="show_hidden">False</property>
+ <property name="do_overwrite_confirmation">False</property>
+ <property name="width_chars">-1</property>
+ </widget>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="right_attach">1</property>
+ <property name="top_attach">0</property>
+ <property name="bottom_attach">1</property>
+ <property name="x_options"></property>
+ <property name="y_options"></property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkLabel" id="label16">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">Path to the GDB binary used</property>
+ <property name="use_underline">False</property>
+ <property name="use_markup">False</property>
+ <property name="justify">GTK_JUSTIFY_LEFT</property>
+ <property name="wrap">False</property>
+ <property name="selectable">False</property>
+ <property name="xalign">0</property>
+ <property name="yalign">0.5</property>
+ <property name="xpad">0</property>
+ <property name="ypad">0</property>
+ <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+ <property name="width_chars">-1</property>
+ <property name="single_line_mode">False</property>
+ <property name="angle">0</property>
+ </widget>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="right_attach">2</property>
+ <property name="top_attach">0</property>
+ <property name="bottom_attach">1</property>
+ <property name="x_options">fill</property>
+ <property name="y_options"></property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ </child>
+
+ <child>
+ <widget class="GtkLabel" id="label15">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes"><b>GDB binary</b></property>
+ <property name="use_underline">False</property>
+ <property name="use_markup">True</property>
+ <property name="justify">GTK_JUSTIFY_LEFT</property>
+ <property name="wrap">False</property>
+ <property name="selectable">False</property>
+ <property name="xalign">0.5</property>
+ <property name="yalign">0.5</property>
+ <property name="xpad">0</property>
+ <property name="ypad">0</property>
+ <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+ <property name="width_chars">-1</property>
+ <property name="single_line_mode">False</property>
+ <property name="angle">0</property>
+ </widget>
+ <packing>
+ <property name="type">label_item</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="tab_expand">False</property>
+ <property name="tab_fill">True</property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkLabel" id="label11">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">Debugger</property>
+ <property name="use_underline">False</property>
+ <property name="use_markup">False</property>
+ <property name="justify">GTK_JUSTIFY_LEFT</property>
+ <property name="wrap">False</property>
+ <property name="selectable">False</property>
+ <property name="xalign">0.5</property>
+ <property name="yalign">0.5</property>
+ <property name="xpad">0</property>
+ <property name="ypad">0</property>
+ <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+ <property name="width_chars">-1</property>
+ <property name="single_line_mode">False</property>
+ <property name="angle">0</property>
+ </widget>
+ <packing>
+ <property name="type">tab</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+</widget>
+
</glade-interface>
diff --git a/src/persp/dbgperspective/nmv-conf-keys.h b/src/persp/dbgperspective/nmv-conf-keys.h
index d95ab30..b7412bd 100644
--- a/src/persp/dbgperspective/nmv-conf-keys.h
+++ b/src/persp/dbgperspective/nmv-conf-keys.h
@@ -44,7 +44,9 @@ extern const char* CONF_KEY_STATUS_WIDGET_MINIMUM_HEIGHT;
extern const char* CONF_KEY_STATUS_PANE_LOCATION;
extern const char* CONF_KEY_DEBUGGER_ENGINE_DYNMOD_NAME;
extern const char* CONF_KEY_EDITOR_STYLE_SCHEME;
-
+extern const char* CONF_KEY_ASM_STYLE_PURE;
+extern const char* CONF_KEY_GDB_BINARY;
+extern const char* CONF_KEY_DEFAULT_NUM_ASM_INSTRS;
NEMIVER_END_NAMESPACE (nemiver)
#endif // __NMV_CONF_KEYS_H__
diff --git a/src/persp/dbgperspective/nmv-dbg-perspective.cc b/src/persp/dbgperspective/nmv-dbg-perspective.cc
index ab1230b..5b029af 100644
--- a/src/persp/dbgperspective/nmv-dbg-perspective.cc
+++ b/src/persp/dbgperspective/nmv-dbg-perspective.cc
@@ -95,12 +95,11 @@
#include "nmv-registers-view.h"
#include "nmv-call-function-dialog.h"
#include "nmv-conf-keys.h"
-
#ifdef WITH_MEMORYVIEW
#include "nmv-memory-view.h"
#endif // WITH_MEMORYVIEW
-
#include "nmv-watchpoint-dialog.h"
+#include "nmv-asm-utils.h"
using namespace std;
using namespace nemiver::common;
@@ -132,6 +131,7 @@ const char *PROGRAM_CWD= "programcwd";
const char *LAST_RUN_TIME= "lastruntime";
const char *DBG_PERSPECTIVE_MOUSE_MOTION_DOMAIN =
"dbg-perspective-mouse-motion-domain";
+const char *DBG_PERSPECTIVE_ASM_DOMAIN = "dbg-perspective-asm-domain";
static const int NUM_INSTR_TO_DISASSEMBLE = 20;
@@ -167,7 +167,10 @@ const char* CONF_KEY_DEBUGGER_ENGINE_DYNMOD_NAME =
"/apps/nemiver/dbgperspective/debugger-engine-dynmod";
const char* CONF_KEY_EDITOR_STYLE_SCHEME =
"/apps/nemiver/dbgperspective/editor-style-scheme";
-
+const char* CONF_KEY_ASM_STYLE_PURE =
+ "/apps/nemiver/dbgperspective/asm-style-pure";
+const char* CONF_KEY_DEFAULT_NUM_ASM_INSTRS =
+ "/apps/nemiver/dbgperspective/default-num-asm-instrs";
const Gtk::StockID STOCK_SET_BREAKPOINT (SET_BREAKPOINT);
const Gtk::StockID STOCK_LINE_POINTER (LINE_POINTER);
@@ -208,6 +211,19 @@ gnome_vfs_file_monitor_cb (GnomeVFSMonitorHandle *a_handle,
DBGPerspective *a_persp);
#endif
+static void
+log_asm_insns (std::list<IDebugger::Asm> a_asm)
+{
+ typedef std::list<IDebugger::Asm> Asms;
+ Asms::const_iterator it = a_asm.begin ();
+ if (it != a_asm.end ()) {
+ LOG_D (*it, DBG_PERSPECTIVE_ASM_DOMAIN);
+ }
+ for (++it; it != a_asm.end (); ++it) {
+ LOG_D ("\n" << *it, DBG_PERSPECTIVE_ASM_DOMAIN);
+ }
+}
+
class DBGPerspective : public IDBGPerspective, public sigc::trackable {
//non copyable
DBGPerspective (const IPerspective&);
@@ -397,23 +413,23 @@ private:
void on_debugger_asm_signal1
(const IDebugger::DisassembleInfo &a_info,
- const std::list<IDebugger::AsmInstr> &a_instrs,
+ const std::list<IDebugger::Asm> &a_instrs,
bool a_show_asm_in_new_tab = true);
void on_debugger_asm_signal2
(const IDebugger::DisassembleInfo &info,
- const std::list<IDebugger::AsmInstr> &instrs,
+ const std::list<IDebugger::Asm> &instrs,
SourceEditor *editor);
void on_debugger_asm_signal3
(const IDebugger::DisassembleInfo &info,
- const std::list<IDebugger::AsmInstr> &instrs,
+ const std::list<IDebugger::Asm> &instrs,
SourceEditor *editor,
const IDebugger::Breakpoint &a_bp);
void on_debugger_asm_signal4
(const IDebugger::DisassembleInfo &info,
- const std::list<IDebugger::AsmInstr> &instrs,
+ const std::list<IDebugger::Asm> &instrs,
const Address &address);
void on_variable_created_for_tooltip_signal
@@ -549,23 +565,23 @@ public:
const UString& get_asm_title ();
bool load_asm (const IDebugger::DisassembleInfo &a_info,
- const std::list<IDebugger::AsmInstr> &a_asm,
+ const std::list<IDebugger::Asm> &a_asm,
Glib::RefPtr<gtksourceview::SourceBuffer> &a_buf);
bool add_asm (const IDebugger::DisassembleInfo &a_info,
- const std::list<IDebugger::AsmInstr> &a_asm,
+ const std::list<IDebugger::Asm> &a_asm,
Glib::RefPtr<gtksourceview::SourceBuffer> &a_buf,
bool a_append = true);
SourceEditor* open_asm (const IDebugger::DisassembleInfo &a_info,
- const std::list<IDebugger::AsmInstr> &a_asm,
+ const std::list<IDebugger::Asm> &a_asm,
bool set_where = false);
void switch_to_asm (const IDebugger::DisassembleInfo &a_info,
- const std::list<IDebugger::AsmInstr> &a_asm);
+ const std::list<IDebugger::Asm> &a_asm);
void switch_to_asm (const IDebugger::DisassembleInfo &a_info,
- const std::list<IDebugger::AsmInstr> &a_asm,
+ const std::list<IDebugger::Asm> &a_asm,
SourceEditor *a_editor);
void pump_asm_including_address (SourceEditor *a_editor,
@@ -984,6 +1000,8 @@ struct DBGPerspective::Priv {
UString custom_font_name;
UString system_font_name;
bool use_launch_terminal;
+ int num_instr_to_disassemble;
+ bool asm_style_pure;
#ifdef WITH_SOURCEVIEWMM2
Glib::RefPtr<gtksourceview::SourceStyleScheme> editor_style;
#endif // WITH_SOURCEVIEWMM2
@@ -1050,6 +1068,8 @@ struct DBGPerspective::Priv {
allow_auto_reload_source (true),
enable_syntax_highlight (true),
use_launch_terminal (false),
+ num_instr_to_disassemble (num_instr_to_disassemble),
+ asm_style_pure (true),
mouse_in_source_editor_x (0),
mouse_in_source_editor_y (0),
in_show_var_value_at_pos_transaction (false),
@@ -1757,7 +1777,8 @@ DBGPerspective::on_breakpoint_go_to_source_action
source_editor->scroll_to_line (a_breakpoint.line ());
break;
case SourceEditor::BUFFER_TYPE_ASSEMBLY:
- source_editor->scroll_to_address (a_breakpoint.address ());
+ source_editor->scroll_to_address
+ (a_breakpoint.address ());
break;
case SourceEditor::BUFFER_TYPE_UNDEFINED:
break;
@@ -2279,7 +2300,12 @@ DBGPerspective::on_conf_key_changed_signal (const UString &a_key,
()->get_scheme (style_id);
m_priv->modify_source_editor_style (m_priv->editor_style);
}
+ }
#endif // WITH_SOURCEVIEWMM2
+ else if (a_key == CONF_KEY_DEFAULT_NUM_ASM_INSTRS) {
+ m_priv->num_instr_to_disassemble = boost::get<int> (a_value);
+ } else if (a_key == CONF_KEY_ASM_STYLE_PURE) {
+ m_priv->asm_style_pure = boost::get<bool> (a_value);
}
NEMIVER_CATCH
}
@@ -2707,7 +2733,7 @@ DBGPerspective::on_debugger_variable_value_signal
void
DBGPerspective::on_debugger_asm_signal1
(const IDebugger::DisassembleInfo &a_info,
- const std::list<IDebugger::AsmInstr> &a_instrs,
+ const std::list<IDebugger::Asm> &a_instrs,
bool a_show_asm_in_new_tab)
{
LOG_FUNCTION_SCOPE_NORMAL_DD;
@@ -2726,7 +2752,7 @@ DBGPerspective::on_debugger_asm_signal1
void
DBGPerspective::on_debugger_asm_signal2
(const IDebugger::DisassembleInfo &a_info,
- const std::list<IDebugger::AsmInstr> &a_instrs,
+ const std::list<IDebugger::Asm> &a_instrs,
SourceEditor *a_editor)
{
LOG_FUNCTION_SCOPE_NORMAL_DD;
@@ -2741,7 +2767,7 @@ DBGPerspective::on_debugger_asm_signal2
void
DBGPerspective::on_debugger_asm_signal3
(const IDebugger::DisassembleInfo &a_info,
- const std::list<IDebugger::AsmInstr> &a_instrs,
+ const std::list<IDebugger::Asm> &a_instrs,
SourceEditor *a_editor,
const IDebugger::Breakpoint &a_bp)
{
@@ -2758,7 +2784,7 @@ DBGPerspective::on_debugger_asm_signal3
void
DBGPerspective::on_debugger_asm_signal4
(const IDebugger::DisassembleInfo &a_info,
- const std::list<IDebugger::AsmInstr> &a_instrs,
+ const std::list<IDebugger::Asm> &a_instrs,
const Address &a_address)
{
LOG_FUNCTION_SCOPE_NORMAL_DD;
@@ -4130,9 +4156,10 @@ DBGPerspective::append_source_editor (SourceEditor &a_sv,
m_priv->pagenum_2_source_editor_map[page_num] = &a_sv;
m_priv->pagenum_2_path_map[page_num] = path;
- if (!do_monitor_file (path)) {
- LOG_ERROR ("Failed to start monitoring file: " << path);
- }
+ if (a_sv.get_buffer_type () == SourceEditor::BUFFER_TYPE_SOURCE)
+ if (!do_monitor_file (path)) {
+ LOG_ERROR ("Failed to start monitoring file: " << path);
+ }
hbox.release ();
close_button.release ();
@@ -4859,6 +4886,10 @@ DBGPerspective::read_default_config ()
m_priv->system_font_name);
conf_mgr.get_key_value (CONF_KEY_USE_LAUNCH_TERMINAL,
m_priv->use_launch_terminal);
+ conf_mgr.get_key_value (CONF_KEY_DEFAULT_NUM_ASM_INSTRS,
+ m_priv->num_instr_to_disassemble);
+ conf_mgr.get_key_value (CONF_KEY_ASM_STYLE_PURE,
+ m_priv->asm_style_pure);
NEMIVER_CATCH_NOX
#ifdef WITH_SOURCEVIEWMM2
@@ -5718,7 +5749,7 @@ DBGPerspective::get_asm_title ()
bool
DBGPerspective::load_asm (const IDebugger::DisassembleInfo &a_info,
- const std::list<IDebugger::AsmInstr> &a_asm,
+ const std::list<IDebugger::Asm> &a_asm,
Glib::RefPtr<SourceBuffer> &a_source_buffer)
{
LOG_FUNCTION_SCOPE_NORMAL_DD;
@@ -5751,16 +5782,54 @@ write_asm_instr (std::ostringstream &a_os,
a_os << a_instr.instruction ();
}
+static void
+write_asm_instr (std::ostringstream &a_os,
+ const IDebugger::Asm &a_asm)
+{
+ switch (a_asm.which ()) {
+ case IDebugger::Asm::TYPE_PURE:
+ write_asm_instr (a_os, a_asm.instr ());
+ break;
+ case IDebugger::Asm::TYPE_MIXED: {
+ const IDebugger::MixedAsmInstr &instr = a_asm.mixed_instr ();
+
+ a_os << "<src file=\""
+ << instr.file_path ()
+ << "\" line=\""
+ << instr.line_number ()
+ << "\"/>\n";
+
+ list<IDebugger::AsmInstr>::const_iterator it =
+ instr.instrs ().begin ();
+ if (it != instr.instrs ().end ()) {
+ write_asm_instr (a_os, *it);
+ ++it;
+ }
+ for (; it != instr.instrs ().end (); ++it) {
+ a_os << "\n";
+ write_asm_instr (a_os, *it);
+ }
+ }
+ break;
+ default:
+ break;
+ }
+}
+
bool
DBGPerspective::add_asm (const IDebugger::DisassembleInfo &/*a_info*/,
- const std::list<IDebugger::AsmInstr> &a_asm,
+ const std::list<IDebugger::Asm> &a_asm,
Glib::RefPtr<SourceBuffer> &a_buf,
bool a_append)
{
+ LOG_FUNCTION_SCOPE_NORMAL_DD;
+
if (!a_buf)
return false;
- std::list<IDebugger::AsmInstr>::const_iterator it = a_asm.begin ();
+ log_asm_insns (a_asm);
+
+ std::list<IDebugger::Asm>::const_iterator it = a_asm.begin ();
if (it == a_asm.end ())
return true;
@@ -5777,8 +5846,9 @@ DBGPerspective::add_asm (const IDebugger::DisassembleInfo &/*a_info*/,
Gtk::TextBuffer::iterator insert_it;
if (a_append) {
insert_it = a_buf->end ();
- if (a_buf->get_char_count () != 0)
+ if (a_buf->get_char_count () != 0) {
insert_it = a_buf->insert (insert_it, endl_os.str ());
+ }
} else {
insert_it = a_buf->begin ();
}
@@ -5803,7 +5873,7 @@ DBGPerspective::add_asm (const IDebugger::DisassembleInfo &/*a_info*/,
// Return true upon successful completion, false otherwise.
SourceEditor*
DBGPerspective::open_asm (const IDebugger::DisassembleInfo &a_info,
- const std::list<IDebugger::AsmInstr> &a_asm,
+ const std::list<IDebugger::Asm> &a_asm,
bool a_set_where)
{
LOG_FUNCTION_SCOPE_NORMAL_DD;
@@ -5853,7 +5923,7 @@ DBGPerspective::open_asm (const IDebugger::DisassembleInfo &a_info,
// \param a_asm a list of asm instructions.
void
DBGPerspective::switch_to_asm (const IDebugger::DisassembleInfo &a_info,
- const std::list<IDebugger::AsmInstr> &a_asm)
+ const std::list<IDebugger::Asm> &a_asm)
{
LOG_FUNCTION_SCOPE_NORMAL_DD;
@@ -5867,7 +5937,7 @@ DBGPerspective::switch_to_asm (const IDebugger::DisassembleInfo &a_info,
// \param a_asm a list of asm instructions.
void
DBGPerspective::switch_to_asm (const IDebugger::DisassembleInfo &a_info,
- const std::list<IDebugger::AsmInstr> &a_asm,
+ const std::list<IDebugger::Asm> &a_asm,
SourceEditor *a_source_editor)
{
if (!a_source_editor)
@@ -7390,14 +7460,24 @@ DBGPerspective::disassemble_and_do (IDebugger::DisassSlot &a_what_to_do)
m_priv->current_frame.address ());
get_frame_breakpoints_address_range (m_priv->current_frame, addr_range);
+ // Increase the address range of instruction to disassemble by a
+ // number N that is equal to m_priv->num_instr_to_disassemble.
+ // 17 is the max size (in bytes) of an instruction on intel
+ // archictecture. So let's say N instructions on IA is at
+ // maximum N x 17.
+ // FIXME: find a way to make this more cross arch.
+ addr_range.max (addr_range.max ()
+ + m_priv->num_instr_to_disassemble * 17);
+
THROW_IF_FAIL (addr_range.min () != 0
&& addr_range.max () != 0);
debugger ()->disassemble (/*start_addr=*/addr_range.min (),
/*start_addr_relative_to_pc=*/false,
- /*end_addr=*/addr_range.max () + 20,
+ /*end_addr=*/addr_range.max (),
/*end_addr_relative_to_pc=*/false,
- a_what_to_do);
+ a_what_to_do,
+ m_priv->asm_style_pure);
}
void
@@ -7419,12 +7499,21 @@ DBGPerspective::disassemble_around_address_and_do
Range addr_range (a_address, a_address);
THROW_IF_FAIL (addr_range.min () != 0
&& addr_range.max () != 0);
+ // Increase the address range of instruction to disassemble by a
+ // number N that is equal to m_priv->num_instr_to_disassemble.
+ // 17 is the max size (in bytes) of an instruction on intel
+ // archictecture. So let's say N instructions on IA is at
+ // maximum N x 17.
+ // FIXME: find a way to make this more cross arch.
+ addr_range.max (addr_range.max ()
+ + m_priv->num_instr_to_disassemble * 17);
debugger ()->disassemble (/*start_addr=*/addr_range.min (),
/*start_addr_relative_to_pc=*/false,
- /*end_addr=*/addr_range.max () + 20,
+ /*end_addr=*/addr_range.max (),
/*end_addr_relative_to_pc=*/false,
- a_what_to_do);
+ a_what_to_do,
+ m_priv->asm_style_pure);
}
diff --git a/src/persp/dbgperspective/nmv-dbg-perspective.h b/src/persp/dbgperspective/nmv-dbg-perspective.h
index f74e3d2..ed529fb 100644
--- a/src/persp/dbgperspective/nmv-dbg-perspective.h
+++ b/src/persp/dbgperspective/nmv-dbg-perspective.h
@@ -74,7 +74,7 @@ public:
virtual void close_file (const UString &a_uri) = 0;
virtual bool load_asm (const IDebugger::DisassembleInfo &a_info,
- const std::list<IDebugger::AsmInstr> &a_asm,
+ const std::list<IDebugger::Asm> &a_asm,
Glib::RefPtr<gtksourceview::SourceBuffer> &a_buf) = 0;
virtual Gtk::Widget* load_menu (const UString &a_filename,
diff --git a/src/persp/dbgperspective/nmv-preferences-dialog.cc b/src/persp/dbgperspective/nmv-preferences-dialog.cc
index abbc255..ca01490 100644
--- a/src/persp/dbgperspective/nmv-preferences-dialog.cc
+++ b/src/persp/dbgperspective/nmv-preferences-dialog.cc
@@ -25,6 +25,7 @@
#include <glib/gi18n.h>
#include <gtkmm/treeview.h>
#include <gtkmm/liststore.h>
+#include "common/nmv-env.h"
#include "nmv-preferences-dialog.h"
#include "nmv-ui-utils.h"
#include "nmv-i-conf-mgr.h"
@@ -35,7 +36,7 @@
#endif
using nemiver::common::DynamicModuleManager;
-
+static const std::string DEFAULT_GDB_BINARY = "default-gdb-binary";
NEMIVER_BEGIN_NAMESPACE(nemiver)
struct SourceDirsCols : public Gtk::TreeModelColumnRecord {
@@ -86,6 +87,10 @@ public:
Gtk::RadioButton *always_reload_radio_button;
Gtk::RadioButton *never_reload_radio_button;
Gtk::RadioButton *confirm_reload_radio_button;
+ Gtk::RadioButton *pure_asm_radio_button;
+ Gtk::RadioButton *mixed_asm_radio_button;
+ Gtk::SpinButton *default_num_asm_instrs_spin_button;
+ Gtk::FileChooserButton *gdb_binary_path_chooser_button;
Glib::RefPtr<Gnome::Glade::Xml> glade;
Priv (const Glib::RefPtr<Gnome::Glade::Xml> &a_glade,
@@ -102,6 +107,10 @@ public:
always_reload_radio_button (0),
never_reload_radio_button (0),
confirm_reload_radio_button (0),
+ pure_asm_radio_button (0),
+ mixed_asm_radio_button (0),
+ default_num_asm_instrs_spin_button (0),
+ gdb_binary_path_chooser_button (0),
glade (a_glade)
{
init ();
@@ -193,9 +202,28 @@ public:
update_reload_files_keys ();
}
+ void on_asm_style_toggled_signal ()
+ {
+ update_asm_style_keys ();
+ }
+
+ void on_num_asms_value_changed_signal ()
+ {
+ update_default_num_asm_instrs_key ();
+ }
+
+ void on_gdb_binary_file_set_signal ()
+ {
+ update_gdb_binary_key ();
+ }
+
void init ()
{
+ // ********************************************
+ // Handle the sources directory preferences tab
+ // ********************************************
+
list_store = Gtk::ListStore::create (source_dirs_cols ());
tree_view =
ui_utils::get_widget_from_glade<Gtk::TreeView> (glade,
@@ -227,6 +255,10 @@ public:
(this, &PreferencesDialog::Priv::on_remove_dir_button_clicked));
remove_dir_button->set_sensitive (false);
+ // *************************************
+ // Handle the "Editor" preference tab
+ // *************************************
+
show_lines_check_button =
ui_utils::get_widget_from_glade<Gtk::CheckButton>
(glade, "showlinescheckbutton");
@@ -283,7 +315,7 @@ public:
"editorstylecombobox");
THROW_IF_FAIL (editor_style_combo);
m_editor_style_model = Gtk::ListStore::create (m_style_columns);
-#ifdef WITH_SOURCEVIEWMM2
+
Glib::RefPtr<gtksourceview::SourceStyleSchemeManager> mgr =
gtksourceview::SourceStyleSchemeManager::get_default ();
std::list<Glib::ustring> schemes = mgr->get_scheme_ids ();
@@ -307,16 +339,6 @@ public:
editor_style_combo->signal_changed ().connect (sigc::mem_fun
(*this,
&PreferencesDialog::Priv::on_editor_style_changed_signal));
-#else
- Gtk::TreeModel::iterator treeiter = m_editor_style_model->append ();
- (*treeiter)[m_style_columns.name] =
- Glib::ustring ("Only available "
- "with gtksourceviewmm2");
- editor_style_combo->set_model (m_editor_style_model);
- editor_style_combo->pack_start (m_style_columns.name);
- editor_style_combo->set_active (treeiter);
- editor_style_combo->set_sensitive (false);
-#endif // WITH_SOURCEVIEWMM2
always_reload_radio_button =
ui_utils::get_widget_from_glade<Gtk::RadioButton>
@@ -343,6 +365,47 @@ public:
confirm_reload_radio_button->signal_toggled ().connect (sigc::mem_fun
(*this,
&PreferencesDialog::Priv::on_reload_files_toggled_signal));
+
+ // *************************************
+ // Handle the "Debugger" preferences tab
+ // *************************************
+
+ pure_asm_radio_button =
+ ui_utils::get_widget_from_glade<Gtk::RadioButton>
+ (glade, "pureasmradio");
+ THROW_IF_FAIL (pure_asm_radio_button);
+ pure_asm_radio_button->signal_toggled ().connect
+ (sigc::mem_fun
+ (*this,
+ &PreferencesDialog::Priv::on_asm_style_toggled_signal));
+
+ mixed_asm_radio_button =
+ ui_utils::get_widget_from_glade<Gtk::RadioButton>
+ (glade, "mixedasmradio");
+ THROW_IF_FAIL (mixed_asm_radio_button);
+ mixed_asm_radio_button->signal_toggled ().connect
+ (sigc::mem_fun
+ (*this,
+ &PreferencesDialog::Priv::on_asm_style_toggled_signal));
+
+ default_num_asm_instrs_spin_button =
+ ui_utils::get_widget_from_glade<Gtk::SpinButton>
+ (glade, "defaultnumasmspin");
+ THROW_IF_FAIL (default_num_asm_instrs_spin_button);
+ default_num_asm_instrs_spin_button->signal_value_changed ().connect
+ (sigc::mem_fun
+ (*this,
+ &PreferencesDialog::Priv::on_num_asms_value_changed_signal));
+
+ gdb_binary_path_chooser_button =
+ ui_utils::get_widget_from_glade<Gtk::FileChooserButton>
+ (glade, "pathtogdbfilechooser");
+ THROW_IF_FAIL (gdb_binary_path_chooser_button);
+ gdb_binary_path_chooser_button->signal_file_set ().connect
+ (sigc::mem_fun
+ (*this,
+ &PreferencesDialog::Priv::on_gdb_binary_file_set_signal));
+
}
void collect_source_dirs ()
@@ -476,6 +539,38 @@ public:
}
}
+ void update_asm_style_keys ()
+ {
+ THROW_IF_FAIL (pure_asm_radio_button);
+ THROW_IF_FAIL (mixed_asm_radio_button);
+
+ if (pure_asm_radio_button->get_active ()) {
+ conf_manager ().set_key_value (CONF_KEY_ASM_STYLE_PURE, true);
+ } else if (mixed_asm_radio_button->get_active ()) {
+ conf_manager ().set_key_value (CONF_KEY_ASM_STYLE_PURE, false);
+ }
+ }
+
+ void update_default_num_asm_instrs_key ()
+ {
+ THROW_IF_FAIL (default_num_asm_instrs_spin_button);
+ int num = default_num_asm_instrs_spin_button->get_value_as_int ();
+ conf_manager ().set_key_value (CONF_KEY_DEFAULT_NUM_ASM_INSTRS,
+ num);
+ }
+
+ void update_gdb_binary_key ()
+ {
+ THROW_IF_FAIL (gdb_binary_path_chooser_button);
+ UString path = gdb_binary_path_chooser_button->get_filename ();
+ if (path.empty ())
+ return;
+ if (path == DEFAULT_GDB_BINARY)
+ path = common::env::get_gdb_program ();
+ conf_manager ().set_key_value (CONF_KEY_GDB_BINARY,
+ Glib::filename_from_utf8 (path));
+ }
+
void update_widget_from_editor_keys ()
{
THROW_IF_FAIL (show_lines_check_button);
@@ -559,10 +654,45 @@ public:
}
}
+ void update_widget_from_debugger_keys ()
+ {
+ THROW_IF_FAIL (pure_asm_radio_button);
+ THROW_IF_FAIL (mixed_asm_radio_button);
+ THROW_IF_FAIL (default_num_asm_instrs_spin_button);
+ THROW_IF_FAIL (gdb_binary_path_chooser_button);
+
+ bool pure_asm = false;
+ if (!conf_manager ().get_key_value (CONF_KEY_ASM_STYLE_PURE,
+ pure_asm)) {
+ LOG_ERROR ("failed to get gconf key " << CONF_KEY_ASM_STYLE_PURE);
+ }
+ if (pure_asm)
+ pure_asm_radio_button->set_active ();
+ else
+ mixed_asm_radio_button->set_active ();
+
+ int num_asms = 25;
+ if (!conf_manager ().get_key_value (CONF_KEY_DEFAULT_NUM_ASM_INSTRS,
+ num_asms)) {
+ LOG_ERROR ("failed to get gconf key "
+ << CONF_KEY_DEFAULT_NUM_ASM_INSTRS);
+ }
+ default_num_asm_instrs_spin_button->set_value (num_asms);
+
+ UString gdb_binary = common::env::get_gdb_program ();
+ if (!conf_manager ().get_key_value (CONF_KEY_GDB_BINARY, gdb_binary)) {
+ LOG_ERROR ("failed to get gconf key" << CONF_KEY_GDB_BINARY);
+ }
+ gdb_binary_path_chooser_button->set_filename
+ (Glib::filename_to_utf8 (gdb_binary));
+
+ }
+
void update_widget_from_conf ()
{
update_widget_from_source_dirs_key ();
update_widget_from_editor_keys ();
+ update_widget_from_debugger_keys ();
}
};//end PreferencesDialog
diff --git a/src/persp/dbgperspective/schemas/nemiver-dbgperspective.schemas b/src/persp/dbgperspective/schemas/nemiver-dbgperspective.schemas
index da1208d..5a2e023 100644
--- a/src/persp/dbgperspective/schemas/nemiver-dbgperspective.schemas
+++ b/src/persp/dbgperspective/schemas/nemiver-dbgperspective.schemas
@@ -171,6 +171,29 @@
</locale>
</schema>
<schema>
+ <key>/schemas/apps/nemiver/dbgperspective/asm-style-pure</key>
+ <applyto>/apps/nemiver/dbgperspective/asm-style-pure</applyto>
+ <owner>nemiver</owner>
+ <type>bool</type>
+ <default>false</default>
+ <locale name="C">
+ <short>Show the assembly in pure form</short>
+ <long>If set to yes, pure assembly code is shown when switching
+to assembly view. Otherwise, source code mixed with assembly code is shown.</long>
+ </locale>
+ </schema>
+ <schema>
+ <key>/schemas/apps/nemiver/dbgperspective/default-num-asm-instrs</key>
+ <applyto>/apps/nemiver/dbgperspective/default-num-asm-instrs</applyto>
+ <owner>nemiver</owner>
+ <type>int</type>
+ <default>25</default>
+ <locale name="C">
+ <short>The number of assembly instructions to show by default</short>
+ <long>The number of instructions that are disassembled by default</long>
+ </locale>
+ </schema>
+ <schema>
<key>/schemas/apps/nemiver/dbgperspective/callstack-expansion-chunk</key>
<applyto>/apps/nemiver/dbgperspective/callstack-expansion-chunk</applyto>
<owner>nemiver</owner>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]