NO

Author Topic: Capture Tab data  (Read 7560 times)

Offline John Z

  • Member
  • *
  • Posts: 790
Re: Capture Tab data
« Reply #15 on: July 09, 2021, 05:13:01 PM »
Well you snooze you lose  :) :) :)

No - just decide I'll pad it out and use a tab too.

Here is an example output from debug of Display.prj
I'll post a new dll for testing after a bit of clean-up.

John Z

Timo - I did use the base code from procedure CopyList2File, although modified to meet my needs.  I will mention you as the original author.   Thank you for the assist!!

removed attachment to free upload space
« Last Edit: August 17, 2022, 04:17:29 PM by John Z »

Grincheux

  • Guest
Re: Capture Tab data
« Reply #16 on: July 09, 2021, 05:16:18 PM »
You can use tab '\t' or ';' or '|' it is not a problem. They are classic separators for CSV files too.
For me the most important tabs when debugging are "Memory", "Registers", "GLOBAL" and "LOCAL"
If you need to use a dialogbox to select the tab we want, it is not a problem because when debugging me have time.
If this solutions is easy for you do not hesitate.
A problem I have found is with the dialog box that say to click on a tab. When I click on the tab the dialog box disappear and if the sound is off that is a problem. Your dialog box always [size=78%]must be VISIBLE and at the FOREGROUND.[/size]

If you had nothing to do for the week end, I have found some work... ;D ;D

Grincheux

  • Guest
Re: Capture Tab data
« Reply #17 on: July 09, 2021, 05:19:10 PM »
Quote
Well you snooze you lose
I dont understand, even using Google Translate.

Your capture is perfect for the result.
That's the kind of result that is exepcted.

GOOD WORK

Grincheux

  • Guest
Re: Capture Tab data
« Reply #18 on: July 09, 2021, 05:46:53 PM »
Quote
which column separator is preferred TAB or COMMA ?


Don't use COMMA

Offline John Z

  • Member
  • *
  • Posts: 790
Re: Capture Tab data
« Reply #19 on: July 09, 2021, 05:48:19 PM »
 :) First things first

"If you snooze you lose."  Loose translation of idiom - if you are sleeping (or busy with something else), events still happen, but you have no input to them,  or if not responding fast enough then decisions made before you have chance to make input. Si vous dormez, vous perdez.

No plan to use a dialog box you just click within the Tab window you want to save, then use File - Save Tab data.



John Z

OK - no comma addition.

Offline John Z

  • Member
  • *
  • Posts: 790
Re: Capture Tab data
« Reply #20 on: July 09, 2021, 06:09:22 PM »
For me the most important tabs when debugging are "Memory", "Registers", "GLOBAL" and "LOCAL"

The only tab it won't support in the next test release is "Memory"  This is a custom class "PC_Memory" and I'm not sure how or if even possible to access yet.


John Z

Grincheux

  • Guest
Re: Capture Tab data
« Reply #21 on: July 09, 2021, 06:11:15 PM »
Rather than text you could build a bmp file it is easier for you. That's right for all tabs.

Offline John Z

  • Member
  • *
  • Posts: 790
Re: Capture Tab data
« Reply #22 on: July 12, 2021, 05:08:26 PM »
Capture.dll

Purpose: Save text from the selected IDE tab 'Project', 'Find in files', 'Output',
 or 'Debug' in a text file under the current project directory. Text filename
 will always be output_yyyymmdd_hhmmss.  Example: output_20210707_085753.txt
 
How to use:
Load and activate the Capture.dll utility
SHA256: FE1137C6A9E995AAB1D486194029E91BC0C4A055BA5E313DDBD78692AD0CAB03

Generate output from any tab mentioned above.

to save the tab data
CLICK once in the tab window to save
then click File, Save Tab data - that's it

The file will be in the project directory.

Note: Sadly after much work listview groups are still not automatically expanded.  To get the list group data in the output file they must be expanded manually before clicking 'Save Tab data'.  Maybe someone  else can get that but I found commctrl.h seems incomplete for listview capabilities e.g. no ListView_GetGroupInfo and others.  In addition on my system, or my lack of knowledge, I could only get _WIN32_WINNT items <  0x501 so higher version items weren't available. For example none of these became available
Code: [Select]
#if (_WIN32_WINNT >= 0x501)
    int iGroupId;
    UINT cColumns;
    PUINT puColumns;
#endif /* _WIN32_WINNT >= 0x501 */
#if (_WIN32_WINNT >= 0x0600)
    int *piColFmt;
    int iGroup;
#endif /* _WIN32_WINNT >= 0x0600 */
-------------- 
   
It does work as a useful add-in for saving tab data, but could be better. 
I've included the project source code too.

John Z

Update - removed old sources new one attached around here https://forum.pellesc.de/index.php?topic=10160.15#lastPost
 update to work under Pelles V11, needed recompile.
« Last Edit: March 06, 2023, 12:38:58 PM by John Z »

Grincheux

  • Guest
Re: Capture Tab data
« Reply #23 on: July 13, 2021, 07:43:41 PM »
Quote
Name     Value                               Comments                                                                                 
RAX      00007FF6758DE98C                                                                                                             
RBX      0000000000000001                                                                                                             
RCX      E586ACAEA40F0000                                                                                                             
RDX      0000000080006010                                                                                                             
RSP      000000E91DB6EB00                                                                                                             
RBP      0000000000000000                                                                                                             
RSI      0000000000000000                                                                                                             
RDI      0000000080006010                                                                                                             
R8       000000E91DB6F0A8                                                                                                             
R9       000000E91DB6EB20                                                                                                             
R10      0000000000000000                                                                                                             
R11      0000000000000000                                                                                                             
R12      0000000000000000                                                                                                             
R13      0000000000000111                                                                                                             
R14      0000000000000000                                                                                                             
R15      0000000000000000                                                                                                             
RIP      00007FF6758C23F7                                                                                                             
EFLAGS   00010300                            CF=0, PF=0, AF=0, ZF=0, SF=0, OF=0, DF=0, IF=1                                           
XMM0     0000000000000000:0000000000000000                                                                                            
XMM1     0000000000000000:0000000000000000                                                                                            
XMM2     0000000000000000:0000000000000000                                                                                            
XMM3     0000000000000000:0000000000000000                                                                                            
XMM4     0000000000000000:0000000000000000                                                                                            
XMM5     0000000000000000:0000000000000000                                                                                            
XMM6     0000000000000000:0000000000000000                                                                                            
XMM7     0000000000000000:0000000000000000                                                                                            
XMM8     0000000000000000:0000000000000000                                                                                            
XMM9     0000000000000000:0000000000000000                                                                                            
XMM10    0000000000000000:0000000000000000                                                                                            
XMM11    0000000000000000:0000000000000000                                                                                            
XMM12    0000000000000000:0000000000000000                                                                                            
XMM13    0000000000000000:0000000000000000                                                                                            
XMM14    0000000000000000:0000000000000000                                                                                            
XMM15    0000000000000000:0000000000000000                                                                                            
MXCSR    00001F80                            IE=0, DE=0, ZE=0, OE=0, UE=0, PE=0, IM=1, DM=1, ZM=1, OM=1, UM=1, PM=1, RC=0, DAZ=0, FTZ=0


GOOD ok for me



Offline John Z

  • Member
  • *
  • Posts: 790
Re: Capture Tab data
« Reply #24 on: July 14, 2021, 01:05:55 PM »
 :) Turned out fairly useful.  Eventually I'll be able to expand those groups.  For now it may even be better to NOT auto-expand.  Looking at Debug of your Display.prj there are 155 groups under one of the debug tabs! 


John

P.S.
Artificial constraints are 20 columns of data, each data field < 260 characters. 


Offline John Z

  • Member
  • *
  • Posts: 790
Re: Capture Tab data
« Reply #25 on: July 17, 2022, 01:15:56 PM »
A while back I wrote this Add-In to capture and save the debugger tabs data and put them into text files.
It works just as well on the normal IDE tabs as well but they also already have 'Select All'.
To me this is very useful to track change from code changes from debug session to debug session.

It works for every Debugger Tab except for the Memory.  However I have been struggling
unsuccessfully to improve the output from the Grouped listview tabs, for example 'Globals'.

As is the Add-In works well to capture and save the Grouped ListView tab(s) in whatever state
is being displayed.  So if Groups are un-expanded that is how the save output appears
and if the user expands the group(s) the saved output then shows the expanded data.
Examples attached.

I would like to be able to Expand all Groups programmatically. Everything I've tried has
failed to change the Group display, except I can hide it or show it :( not too useful in this case.
I've scoured the WEB and MS sites and tried unsuccessfully everything I could find or think of.
Even tried sending keystrokes :).  So I'm doing it wrong, or it just can't be done in this
situation.  Maybe it is 'Owner Draw' and it can't be done, I don't know. 

Has anyone tried something similar?  Recognize that all I have access to is the Listview Handle.

John Z

Had examples attached but get some sort of upload folder full error.

Offline MrBcx

  • Global Moderator
  • Member
  • *****
  • Posts: 175
    • Bcx Basic to C/C++ Translator
Re: Capture Tab data
« Reply #26 on: July 17, 2022, 07:36:00 PM »

Had examples attached but get some sort of upload folder full error.

John .. You might want to send Christian a private msg.

 
Bcx Basic to C/C++ Translator
https://www.BcxBasicCoders.com

Offline John Z

  • Member
  • *
  • Posts: 790
Re: Capture Tab data
« Reply #27 on: August 14, 2022, 05:17:04 PM »
So here is my road block.  My Capture add-in lets you save the data from any tab below the IDE edit window, first image, into a text file. Just click in a tab then select menu File - Save Tab Data.  It works for every tab except the 'Memory' display.
BUT -
When the tab is using Grouped Listview the saved text file is the same, so if the listview is grouped the output it grouped, if the list view has been expanded then the saved text file is expanded.  My thought is it would be nice and perhaps more informative to programmatically expand the grouped listview before saving it, second image.  I have not been able to do it :(

Has anyone tried this as an add-in?

John Z

Offline John Z

  • Member
  • *
  • Posts: 790
Re: Capture Tab data
« Reply #28 on: March 06, 2023, 12:35:27 PM »
Version updated to version 1.2.1 for Pelles C version 11

Just needed re-compile, but added some processing information to the output tab too.

John Z

Update attachment on 3/09/2023 to version 1.2.2 (directory determination improvement)
Update 03/12+2023 removed
« Last Edit: March 12, 2023, 08:19:35 PM by John Z »

Offline TimoVJL

  • Global Moderator
  • Member
  • *****
  • Posts: 2091
Re: Capture Tab data
« Reply #29 on: March 07, 2023, 08:55:43 AM »
Too often "Access denied" for opening file.
Perhaps better to find project path for file.
May the source be with you