# Copyright (C) 2023-2024 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program. If not, see . # Some basic tests of the disassemble command. Tests in this script # should be architecture independent. standard_testfile if { [prepare_for_testing "failed to prepare" $testfile ${srcfile}] == -1 } { return -1 } if ![runto_main] { return -1 } # Check the '/s' and '/m' flags can't be used together. gdb_test "disassemble /sm main" \ "Cannot specify both /m and /s\\." gdb_test "disassemble /ms main" \ "Cannot specify both /m and /s\\." # Check the '/r' and '/b' flags can't be used together. gdb_test "disassemble /rb main" \ "Cannot specify both /r and /b\\." gdb_test "disassemble /br main" \ "Cannot specify both /r and /b\\." # Check disassembly using 'FILE'::FUNC syntax. gdb_test "disassemble '$srcfile'::main" \ "Dump of assembler code for function main:.*End of assembler dump\\."