Skip to content

Commit d3d76fa

Browse files
Fix typos (#48)
1 parent a807d69 commit d3d76fa

File tree

4 files changed

+27
-27
lines changed

4 files changed

+27
-27
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,4 +38,4 @@ Does what it says on the tin.
3838

3939
Resolves PS3 syscalls to the correct name and defines functions for them.
4040

41-
Should be ran after AnalyzePs3Binary and auto analysis have completed.
41+
Should be run after AnalyzePs3Binary and auto analysis have completed.

data/syscall.txt

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
13 sys_process_get_id
1414
14 sys_process_is_spu_lock_line_reservation_address
1515
15 sys_process_create
16-
#non existant
16+
#nonexistent
1717
16 syscall_16
1818
17 sys_process_create_primary_ppu_thread
1919
18 sys_process_getppid
@@ -30,7 +30,7 @@
3030
29 sys_process_get_id2
3131
30 _sys_process_get_paramsfo
3232
31 sys_process_get_ppu_guid
33-
#Non existant
33+
#nonexistent
3434
32 syscall_32
3535
33 syscall_33
3636
34 syscall_34
@@ -60,7 +60,7 @@
6060
56 sys_ppu_thread_rename
6161
57 sys_ppu_thread_recover_page_fault
6262
58 sys_ppu_thread_get_page_fault_context
63-
#non existant
63+
#nonexistent
6464
59 syscall_59
6565
60 sys_trace_create
6666
61 sys_trace_start
@@ -81,7 +81,7 @@
8181
76 sys_timer_disconnect_event_queue
8282
77 sys_trace_create2_in_cbepm
8383
78 sys_trace_78
84-
#non existant
84+
#nonexistent
8585
79 syscall_79
8686
80 sys_interrupt_tag_create
8787
81 sys_interrupt_tag_destroy
@@ -152,7 +152,7 @@
152152
146 sys_time_get_system_time
153153
147 sys_time_get_timebase_frequency
154154
148 _sys_rwlock_trywlock
155-
#non existant
155+
#nonexistent
156156
149 syscall_149
157157
150 sys_raw_spu_create_interrupt_tag
158158
151 sys_raw_spu_set_int_mask
@@ -166,15 +166,15 @@
166166
159 _sys_spu_image_get_segments
167167
160 sys_raw_spu_create
168168
161 sys_raw_spu_destroy
169-
#non existant
169+
#nonexistent
170170
162 syscall_162
171171
163 sys_raw_spu_read_puint_mb
172-
#non existant
172+
#nonexistent
173173
164 syscall_164
174174
165 sys_spu_thread_get_exit_status
175175
166 sys_spu_thread_set_argument
176176
167 sys_spu_thread_group_start_on_exit
177-
#non existant
177+
#nonexistent
178178
168 syscall_168
179179
169 sys_spu_initialize
180180
170 sys_spu_thread_group_create
@@ -202,7 +202,7 @@
202202
192 sys_spu_thread_disconnect_event
203203
193 sys_spu_thread_bind_queue
204204
194 sys_spu_thread_unbind_queue
205-
#non existant
205+
#nonexistent
206206
195 syscall_195
207207
196 sys_raw_spu_set_spu_cfg
208208
197 sys_raw_spu_get_spu_cfg
@@ -212,7 +212,7 @@
212212
201 console_getc
213213
202 event_create_port
214214
203 event_send_locally
215-
#non existant
215+
#nonexistent
216216
204 syscall_204
217217
205 syscall_205
218218
206 syscall_206
@@ -229,15 +229,15 @@
229229
217 logical_console_getc
230230
218 logical_console_putc
231231
219 logical_console_flush
232-
#non existant
232+
#nonexistent
233233
220 syscall_220
234234
221 syscall_221
235235
222 syscall_222
236236
223 syscall_223
237237
224 syscall_224
238238
225 syscall_225
239239
226 get_logical_partition_id
240-
#non existant
240+
#nonexistent
241241
227 syscall_227
242242
228 syscall_228
243243
229 syscall_229
@@ -252,7 +252,7 @@
252252
238 sys_isolated_spu_set_spu_cfg
253253
239 sys_isolated_spu_get_spu_cfg
254254
240 sys_isolated_spu_read_puint_mb
255-
#non existant
255+
#nonexistent
256256
241 syscall_241
257257
242 syscall_242
258258
243 syscall_243
@@ -267,14 +267,14 @@
267267
252 sys_spu_thread_group_disconnect_event_all_threads
268268
253 sys_spu_thread_group_syscall_253
269269
254 sys_spu_thread_group_log
270-
#non existant
270+
#nonexistent
271271
255 syscall_255
272272
256 syscall_256
273273
257 syscall_257
274274
258 syscall_258
275275
259 syscall_259
276276
260 sys_spu_image_open_by_fd
277-
#non existant
277+
#nonexistent
278278
261 syscall_261
279279
262 syscall_262
280280
263 syscall_263
@@ -330,7 +330,7 @@
330330
313 sys_vm_memory_map_different
331331
314 syscall_314
332332
315 syscall_315
333-
#non existant
333+
#nonexistent
334334
316 syscall_316
335335
317 syscall_317
336336
318 syscall_318
@@ -380,14 +380,14 @@
380380
362 sys_mmapper_allocate_shared_memory_from_container
381381
363 syscall_363
382382
364 syscall_364
383-
#non existant
383+
#nonexistent
384384
365 syscall_365
385385
366 syscall_366
386386
367 sys_uart_initialize
387387
368 sys_uart_receive
388388
369 sys_uart_send
389389
370 sys_uart_get_params
390-
#non existant
390+
#nonexistent
391391
371 syscall_371
392392
372 sys_game_watchdog_start
393393
373 sys_game_watchdog_stop

ghidra_scripts/AnalyzePs3Binary.java

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -320,7 +320,7 @@ private void setR2(int toc) throws Exception {
320320
//ELFs generally have one section entirely of imports
321321
private void createImportStubsFromMemoryBlock(MemoryBlock block) throws Exception {
322322
final long stub_count = block.getSize() / Ps3DataStructureTypes.sceLibStubPpu32DataType.getLength();
323-
println("Entries = "+stub_count+" size="+block.getSize()+" struc_size="+Ps3DataStructureTypes.sceLibStubPpu32DataType.getLength());
323+
println("Entries = "+stub_count+" size="+block.getSize()+" struct_size="+Ps3DataStructureTypes.sceLibStubPpu32DataType.getLength());
324324
if(stub_count == 0) {
325325
println("No imports");
326326
return;
@@ -337,7 +337,7 @@ private void createImportStubsFromModuleInfo(Address module_info_addr) throws Ex
337337
final long stub_size = stub_end - stub_top;
338338
final long stub_count = stub_size / Ps3DataStructureTypes.sceLibStubPpu32DataType.getLength();
339339

340-
println("Entries = "+stub_count+" size="+stub_size+" struc_size="+Ps3DataStructureTypes.sceLibStubPpu32DataType.getLength());
340+
println("Entries = "+stub_count+" size="+stub_size+" struct_size="+Ps3DataStructureTypes.sceLibStubPpu32DataType.getLength());
341341

342342
if(stub_count == 0) {
343343
//Can happen, eg libL10n
@@ -354,7 +354,7 @@ private void createImportStubsFromPrxInfo(Address prxInfo_addr) throws Exception
354354
final long stub_end = sys_process_prx_info_t.getComponent(7).getInt(0);
355355
final long stub_size = stub_end - stub_top;
356356
final long stub_count = stub_size / Ps3DataStructureTypes.sceLibStubPpu32DataType.getLength();
357-
println("Entries = "+stub_count+" size="+stub_size+" struc_size="+Ps3DataStructureTypes.sceLibStubPpu32DataType.getLength());
357+
println("Entries = "+stub_count+" size="+stub_size+" struct_size="+Ps3DataStructureTypes.sceLibStubPpu32DataType.getLength());
358358
if(stub_count == 0) {
359359
println("No imports");
360360
return;
@@ -482,7 +482,7 @@ private void createImportStubs(Address start_addr, int stub_count) throws Except
482482
final String fnid_name = FnidUtils.getNameForFnid(this, libname, fnid);
483483

484484
// Create nid label
485-
createLabel(nidArray.getComponent(j).getAddress(), "VNID_"+fnid_name, true);
485+
createLabel(nidArray.getComponent(j).getAddress(), "FNID_"+fnid_name, true);
486486

487487
// Create var label
488488
final Address varAddress = currentAddress.getNewAddress(funcAddrArray.getComponent(j).getInt(0));
@@ -505,7 +505,7 @@ private void createImportStubs(Address start_addr, int stub_count) throws Except
505505

506506
private void createExportEntsFromMemoryBlock(MemoryBlock block) throws Exception {
507507
final long ent_count = block.getSize() / Ps3DataStructureTypes.sceLibEntPpu32DataType.getLength();
508-
println("Entries = "+ent_count+" size="+block.getSize()+" struc_size="+Ps3DataStructureTypes.sceLibEntPpu32DataType.getLength());
508+
println("Entries = "+ent_count+" size="+block.getSize()+" struct_size="+Ps3DataStructureTypes.sceLibEntPpu32DataType.getLength());
509509
if(ent_count == 0) {
510510
println("No exports");
511511
return;
@@ -521,7 +521,7 @@ private void createExportEntsFromModuleInfo(Address module_info_addr) throws Exc
521521
final long ent_size = ent_end - ent_top;
522522
final long ent_count = ent_size / Ps3DataStructureTypes.sceLibEntPpu32DataType.getLength();
523523

524-
println("Entries = "+ent_count+" size="+ent_size+" struc_size="+Ps3DataStructureTypes.sceLibEntPpu32DataType.getLength());
524+
println("Entries = "+ent_count+" size="+ent_size+" struct_size="+Ps3DataStructureTypes.sceLibEntPpu32DataType.getLength());
525525

526526
createExportEnts(currentAddress.getNewAddress(ent_top), (int) ent_count);
527527
}
@@ -532,7 +532,7 @@ private void createExportEntsFromPrxInfo(Address prxInfo_addr) throws Exception
532532
final long ent_end = sys_process_prx_info_t.getComponent(5).getInt(0);
533533
final long ent_size = ent_end - ent_top;
534534
final long ent_count = ent_size / Ps3DataStructureTypes.sceLibEntPpu32DataType.getLength();
535-
println("Entries = "+ent_count+" size="+ent_size+" struc_size="+Ps3DataStructureTypes.sceLibEntPpu32DataType.getLength());
535+
println("Entries = "+ent_count+" size="+ent_size+" struct_size="+Ps3DataStructureTypes.sceLibEntPpu32DataType.getLength());
536536
if(ent_count == 0) {
537537
println("No exports");
538538
return;

ghidra_scripts/DefinePS3Syscalls.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ protected void run() throws Exception {
121121
//get all of the functions that contain system calls
122122
//note that this will not find system call instructions that are not in defined functions
123123
Map<Function, Set<Address>> funcsToCalls = getSyscallsInFunctions(currentProgram, monitor);
124-
printf("FGound %d syscalls callers\n", funcsToCalls.size());
124+
printf("Found %d syscalls callers\n", funcsToCalls.size());
125125

126126
if (funcsToCalls.isEmpty()) {
127127
printf("No system calls found (within defined functions)\n");

0 commit comments

Comments
 (0)