1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162 |
- #!/bin/bash
- # Copyright 2014 Google Inc. All Rights Reserved.
- #
- # Licensed under the Apache License, Version 2.0 (the "License");
- # you may not use this file except in compliance with the License.
- # You may obtain a copy of the License at
- #
- # http://www.apache.org/licenses/LICENSE-2.0
- #
- # Unless required by applicable law or agreed to in writing, software
- # distributed under the License is distributed on an "AS IS" BASIS,
- # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- # See the License for the specific language governing permissions and
- # limitations under the License.
- #
- # nm stub for testing of listing.
- # Will recognize (and ignore) the -nC options.
- #
- # Outputs fixed nm output.
-
- while getopts nC opt; do
- case "$opt" in
- n) ;;
- C) demangle=1;;
- *)
- echo "unrecognized option: $1" >&2
- exit 1
- esac
- done
-
- if [ $demangle ]
- then
- cat <<EOF
- 0000000000001000 t lineA001
- 0000000000001000 t lineA002
- 0000000000001000 t line1000
- 0000000000002000 t line200A
- 0000000000002000 t line2000
- 0000000000002000 t line200B
- 0000000000003000 t line3000
- 0000000000003000 t Dumb::operator()(char const*) const
- 0000000000003000 t lineB00C
- 0000000000003000 t line300D
- 0000000000004000 t _the_end
- EOF
- exit 0
- fi
-
- cat <<EOF
- 0000000000001000 t lineA001
- 0000000000001000 t lineA002
- 0000000000001000 t line1000
- 0000000000002000 t line200A
- 0000000000002000 t line2000
- 0000000000002000 t line200B
- 0000000000003000 t line3000
- 0000000000003000 t _ZNK4DumbclEPKc
- 0000000000003000 t lineB00C
- 0000000000003000 t line300D
- 0000000000004000 t _the_end
- EOF
- exit 0
|