I am using an external binary to view memory starting from a specific address and i want to automate this via perl however there are problems. Hope you can help me ..thx
The output of the programme is like below:
Expand|Select|Wrap|Line Numbers
- bash-3.2$ mem_disp 12B21D20 100
- Opening RO Data Memory File scp.ro
- Opening Memory File CP2.16.0000000c.18.pmd.raw
- 12B21D20 12B6E500 186CAF00 12D81A00 00000010 *.....l..........*
- 12B21D30 000000AA 01060009 00000088 00000000 *................*
- 12B21D40 F05500FF 00019E02 00030000 00047849 *.U............xI*
- 12B21D50 0001013F 0001012F 805A0022 00593FC1 *...?.../.Z.".Y?.*
- 12B21D60 A5020000 480E05ED 00010000 00900058 *....H..........X*
- 12B21D70 00000000 00000000 00000000 00000000 *................*
- 12B21D80 43616C6C 50726F63 00000000 00000000 *CallProc........*
- 12B21D90 00000000 00000000 43616C6C 50726F63 *........CallProc*
- 12B21DA0 5F537663 5F534259 00000000 00000000 *_Svc_SBY........*
================================================== ==========
Expand|Select|Wrap|Line Numbers
- #!/usr/bin/perl -w
- open (FILE, 'addr.txt');
- foreach my $line (<FILE>){
- $command = `mem_disp $line 80`;
- print "$command";
- }
- close (FILE);
This gives the following output:
Expand|Select|Wrap|Line Numbers
- bash-3.2$ split.pl
- Name "main::command" used only once: possible typo at ./split.pl line 5.
- sh: line 1: 80: command not found
- bash-3.2$ split.pl
- sh: line 1: 80: command not found
- Opening RO Data Memory File scp.ro
- Opening Memory File CP2.16.0000000c.18.pmd.raw
- 12B21D20 12B6E500 *.... *