1 /* |
1 /* |
2 * Copyright (c) 2008, 2013, Oracle and/or its affiliates. All rights reserved. |
2 * Copyright (c) 2008, 2018, Oracle and/or its affiliates. All rights reserved. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 * |
4 * |
5 * The Universal Permissive License (UPL), Version 1.0 |
5 * The Universal Permissive License (UPL), Version 1.0 |
6 * |
6 * |
7 * Subject to the condition set forth below, permission is hereby granted to |
7 * Subject to the condition set forth below, permission is hereby granted to |
332 /* On PowerPC we get warnings, if we pass empty options */ |
335 /* On PowerPC we get warnings, if we pass empty options */ |
333 (caller_options == NULL) ? NULL : app_data->insn_options); |
336 (caller_options == NULL) ? NULL : app_data->insn_options); |
334 |
337 |
335 /* Finish linking together the various callback blocks. */ |
338 /* Finish linking together the various callback blocks. */ |
336 app_data->dinfo.application_data = (void*) app_data; |
339 app_data->dinfo.application_data = (void*) app_data; |
337 app_data->dfn = disassembler(native_bfd); |
340 app_data->dfn = disassembler(bfd_get_arch(native_bfd), |
|
341 bfd_big_endian(native_bfd), |
|
342 bfd_get_mach(native_bfd), |
|
343 native_bfd); |
338 app_data->dinfo.print_address_func = hsdis_print_address_func; |
344 app_data->dinfo.print_address_func = hsdis_print_address_func; |
339 app_data->dinfo.read_memory_func = hsdis_read_memory_func; |
345 app_data->dinfo.read_memory_func = hsdis_read_memory_func; |
340 |
346 |
341 if (app_data->dfn == NULL) { |
347 if (app_data->dfn == NULL) { |
342 const char* bad = app_data->arch_name; |
348 const char* bad = app_data->arch_name; |