Skip to content

Commit

Permalink
update error code and ignore no dmnt
Browse files Browse the repository at this point in the history
  • Loading branch information
tomvita committed Nov 5, 2021
1 parent 236bc37 commit 98ca37f
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 7 deletions.
1 change: 1 addition & 0 deletions PointerSearcher/Form1.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

22 changes: 15 additions & 7 deletions PointerSearcher/Form1.cs
Original file line number Diff line number Diff line change
Expand Up @@ -922,6 +922,12 @@ private bool showerror( byte[] b )
if ( res == 127 )
errorBox.Text += "InvalidHwBreakpoint";
}
if (module == 345 )
{
errorBox.Text += " Libnx ";
if ( res == 37 )
errorBox.Text += "IncompatSysVer";
}
user_abort = false;
user_abort2 = false;
command_inprogress = false;
Expand Down Expand Up @@ -980,6 +986,7 @@ private void getstatus_Click( object sender, EventArgs e )
c = s.Receive( k );
long curpid = BitConverter.ToInt64( k, 0 );
curpidBox.Text = Convert.ToString( curpid );
pid0Box.Text = Convert.ToString( curpid );
while ( s.Available < 4 )
{
;
Expand Down Expand Up @@ -1479,7 +1486,8 @@ private void attachdmntbutton_Click( object sender, EventArgs e )

byte[] b = new byte[s.Available];
s.Receive( b );
if ( !showerror( b ) )
showerror( b ); //ignore error due to no dmnt
//if ( !showerror( b ) )
{
attachdmntbutton.BackColor = System.Drawing.Color.LightGreen;
getstatus_Click( sender, e );
Expand Down Expand Up @@ -2341,21 +2349,21 @@ private void SetWatchPoint_button_Click( Object sender, EventArgs e )

int a = SendMessage( NoexsCommands.SetBreakpoint );
// setup HWBP context
// send id = 5
// send id = 4
byte[] id = new byte[4];
id = BitConverter.GetBytes( Convert.ToInt32(textBox8.Text) );
id = BitConverter.GetBytes((int)4 );// Convert.ToInt32(textBox8.Text) ); //
a = SendData( id );
// send addr = 0
byte[] k = new byte[8];
// long k1 = Convert.ToInt64( WatchPointAddress_textBox11.Text ); //get address
//long k1 = 0;
long k1 = Convert.ToInt64( WatchPointAddress_textBox11.Text, 16 ); //get address long heapStart = Convert.ToInt64( dgvDumpTargets.Rows[fileselect].Cells[3].Value.ToString(), 16 );
long k1 = 0;
// long k1 = Convert.ToInt64( WatchPointAddress_textBox11.Text, 16 ); //get address long heapStart = Convert.ToInt64( dgvDumpTargets.Rows[fileselect].Cells[3].Value.ToString(), 16 );
k = BitConverter.GetBytes( k1 );
a = SendData( k );
// send flag
long res = 1; //enabled
res |= 0xF << 5; // Match the A64 or A32 instruction at DBGBVR, or context match.n
res |= 6 << 16; // does this matter?
res |= 0 << 16; // does this matter?
res |= 3 << 20; // LINKED_CONTEXT_IDR_MATCH(0b0011)
long dbgbcr = ( 0x3 << 20 ) | ( 0x0 << 16 ) | ( 0xF << 5 ) | 1;
k = BitConverter.GetBytes( (long)dbgbcr );
Expand Down Expand Up @@ -2409,7 +2417,7 @@ private void button14_Click( Object sender, EventArgs e )
res |= 2 << 3; //1 = read, 2 = write, 3 = RW
res |= 0xFF << 5; // byte select all 8 bytes
res |= 4 << 16; // link BP number
res |= 5 << 24; // not using mask == 0
res |= 0 << 24; // not using mask == 0
k = BitConverter.GetBytes( res );
a = SendData( k );

Expand Down

0 comments on commit 98ca37f

Please sign in to comment.