[haiku-commits] haiku: hrev50160 - src/apps/debugger/user_interface/gui/team_window

  • From: anevilyak@xxxxxxxxx
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Sun, 20 Mar 2016 04:16:03 +0100 (CET)

hrev50160 adds 1 changeset to branch 'master'
old head: 20122a6a7786a3d9402606d01ecf674c517ad01a
new head: 8c524c608dca1c9560b4d3f1cf9d2ae4e989132d
overview: 
http://cgit.haiku-os.org/haiku/log/?qt=range&q=8c524c608dca+%5E20122a6a7786

----------------------------------------------------------------------------

8c524c608dca: Debugger: Add more information to image list.
  
  ImageListView:
  - Add columns for the respective start and end addresses of the text and data
    segments  of each image. Correspondingly, adjust the table model to return
    the appropriate fields from the image's info. This can come in handy for
    quickly determining the approximate location of an otherwise unknown memory
    address, among other things.

                                         [ Rene Gollent <rene@xxxxxxxxxxx> ]

----------------------------------------------------------------------------

Revision:    hrev50160
Commit:      8c524c608dca1c9560b4d3f1cf9d2ae4e989132d
URL:         http://cgit.haiku-os.org/haiku/commit/?id=8c524c608dca
Author:      Rene Gollent <rene@xxxxxxxxxxx>
Date:        Sun Mar 20 03:12:02 2016 UTC

----------------------------------------------------------------------------

1 file changed, 24 insertions(+), 2 deletions(-)
.../gui/team_window/ImageListView.cpp            | 26 ++++++++++++++++++--

----------------------------------------------------------------------------

diff --git a/src/apps/debugger/user_interface/gui/team_window/ImageListView.cpp 
b/src/apps/debugger/user_interface/gui/team_window/ImageListView.cpp
index 4494fc0..d647a45 100644
--- a/src/apps/debugger/user_interface/gui/team_window/ImageListView.cpp
+++ b/src/apps/debugger/user_interface/gui/team_window/ImageListView.cpp
@@ -1,6 +1,6 @@
 /*
  * Copyright 2009, Ingo Weinhold, ingo_weinhold@xxxxxx.
- * Copyright 2011, Rene Gollent, rene@xxxxxxxxxxx.
+ * Copyright 2011-2016, Rene Gollent, rene@xxxxxxxxxxx.
  * Distributed under the terms of the MIT License.
  */
 
@@ -18,6 +18,7 @@
 
 #include "GuiSettingsUtils.h"
 #include "table/TableColumns.h"
+#include "TargetAddressTableColumn.h"
 #include "Tracing.h"
 
 
@@ -92,7 +93,7 @@ public:
 
        virtual int32 CountColumns() const
        {
-               return 2;
+               return 6;
        }
 
        virtual int32 CountRows() const
@@ -106,6 +107,7 @@ public:
                if (image == NULL)
                        return false;
 
+               const ImageInfo& info = image->Info();
                switch (columnIndex) {
                        case 0:
                                value.SetTo(image->ID());
@@ -113,6 +115,18 @@ public:
                        case 1:
                                value.SetTo(image->Name(), 
B_VARIANT_DONT_COPY_DATA);
                                return true;
+                       case 2:
+                               value.SetTo(info.TextBase());
+                               return true;
+                       case 3:
+                               value.SetTo(info.TextBase() + info.TextSize());
+                               return true;
+                       case 4:
+                               value.SetTo(info.DataBase());
+                               return true;
+                       case 5:
+                               value.SetTo(info.DataBase() + info.DataSize());
+                               return true;
                        default:
                                return false;
                }
@@ -293,6 +307,14 @@ ImageListView::_Init()
                B_TRUNCATE_MIDDLE, B_ALIGN_RIGHT));
        fImagesTable->AddColumn(new StringTableColumn(1, "Name", 80, 40, 1000,
                B_TRUNCATE_BEGINNING, B_ALIGN_LEFT));
+       fImagesTable->AddColumn(new TargetAddressTableColumn(2, "Text Base", 80,
+               40, 1000, B_TRUNCATE_MIDDLE, B_ALIGN_RIGHT));
+       fImagesTable->AddColumn(new TargetAddressTableColumn(3, "Text End", 80, 
40,
+               1000, B_TRUNCATE_MIDDLE, B_ALIGN_RIGHT));
+       fImagesTable->AddColumn(new TargetAddressTableColumn(4, "Data Base", 80,
+               40, 1000, B_TRUNCATE_MIDDLE, B_ALIGN_RIGHT));
+       fImagesTable->AddColumn(new TargetAddressTableColumn(5, "Data End", 80, 
40,
+               1000, B_TRUNCATE_MIDDLE, B_ALIGN_RIGHT));
 
        fImagesTable->AddTableListener(this);
 


Other related posts:

  • » [haiku-commits] haiku: hrev50160 - src/apps/debugger/user_interface/gui/team_window - anevilyak