aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dwarf.c
diff options
context:
space:
mode:
authorMichael Mann <mmann78@netscape.net>2017-11-18 22:31:45 -0500
committerMichael Mann <mmann78@netscape.net>2017-11-19 05:14:57 +0000
commitbb47a68e0983fa4da5b607dd775e227528da1955 (patch)
tree7a1b5d63cb183f807620eaab28291b82633b2507 /epan/dwarf.c
parent752d0ef753983b45142e76a71dcdf3ab3c082439 (diff)
Move dissect_leb128 to file-elf.c
This allows for the removal of epan/dwarf.[ch] Functionality could probably be handled by an encoding (like dissect_uleb128), but for now keep it in file-elf.c as that's the only functionality currently using it. Change-Id: I84cf6af02abb3d53ea7d9b774e3313d77a1ff497 Reviewed-on: https://code.wireshark.org/review/24486 Petri-Dish: Michael Mann <mmann78@netscape.net> Tested-by: Petri Dish Buildbot Reviewed-by: Michael Mann <mmann78@netscape.net>
Diffstat (limited to 'epan/dwarf.c')
-rw-r--r--epan/dwarf.c63
1 files changed, 0 insertions, 63 deletions
diff --git a/epan/dwarf.c b/epan/dwarf.c
deleted file mode 100644
index 8c7a145e9b..0000000000
--- a/epan/dwarf.c
+++ /dev/null
@@ -1,63 +0,0 @@
-/* dwarf.c
- * Common DWARF parts
- *
- * Wireshark - Network traffic analyzer
- * By Gerald Combs <gerald@wireshark.org>
- * Copyright 1998 Gerald Combs
- *
- * 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 2
- * 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, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
- */
-
-#include "config.h"
-
-#include <epan/tvbuff.h>
-
-#include "dwarf.h"
-
-gint
-dissect_leb128(tvbuff_t *tvb, gint offset, gint64 *value)
-{
- guint start_offset = offset;
- guint shift = 0;
- guint8 byte;
-
- *value = 0;
-
- do {
- byte = tvb_get_guint8(tvb, offset);
- offset += 1;
-
- *value |= ((guint64)(byte & 0x7F) << shift);
- shift += 7;
- } while ((byte & 0x80) && (shift < 64));
-
- if (shift < 64 && byte & 0x40)
- *value |= - ((gint64)1 << shift);
-
- return offset - start_offset;
-}
-
-/*
- * Editor modelines - http://www.wireshark.org/tools/modelines.html
- *
- * Local variables:
- * c-basic-offset: 4
- * tab-width: 8
- * indent-tabs-mode: nil
- * End:
- *
- * vi: set shiftwidth=4 tabstop=8 expandtab:
- * :indentSize=4:tabSize=8:noTabs=true:
- */