From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 25395 invoked by alias); 19 Feb 2013 17:18:23 -0000 Received: (qmail 25373 invoked by uid 22791); 19 Feb 2013 17:18:21 -0000 X-SWARE-Spam-Status: No, hits=-3.6 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_ENVFROM_END_DIGIT,FREEMAIL_FROM,KHOP_RCVD_TRUST,RCVD_IN_DNSWL_LOW,RCVD_IN_HOSTKARMA_YE X-Spam-Check-By: sourceware.org Received: from mail-ie0-f179.google.com (HELO mail-ie0-f179.google.com) (209.85.223.179) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 19 Feb 2013 17:18:14 +0000 Received: by mail-ie0-f179.google.com with SMTP id k11so8677968iea.24 for ; Tue, 19 Feb 2013 09:18:13 -0800 (PST) MIME-Version: 1.0 X-Received: by 10.50.219.228 with SMTP id pr4mr9433770igc.40.1361294293922; Tue, 19 Feb 2013 09:18:13 -0800 (PST) Received: by 10.64.231.200 with HTTP; Tue, 19 Feb 2013 09:18:13 -0800 (PST) Date: Tue, 19 Feb 2013 17:18:00 -0000 Message-ID: Subject: [patch gdb]: Fix PR gdb/15161 part 1 of 3 From: Kai Tietz To: gdb-patches@sourceware.org Content-Type: text/plain; charset=ISO-8859-1 X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2013-02/txt/msg00506.txt.bz2 Hi, this patch fixes part one of the PR gdb/15161 issue in symfile.c. ChangeLog 2013-02-19 Kai Tietz PR gdb/15161 * symfile.c (load_section_data): Change type of load_offset to CORE_ADDR. (generic_load): User strtoulst instead of strtoul for evalute of load_offset. Ok for apply? Regards, Kai Index: symfile.c =================================================================== RCS file: /cvs/src/src/gdb/symfile.c,v retrieving revision 1.363 diff -p -u -r1.363 symfile.c --- symfile.c 1 Feb 2013 19:39:03 -0000 1.363 +++ symfile.c 19 Feb 2013 16:52:32 -0000 @@ -1948,7 +1948,7 @@ add_section_size_callback (bfd *abfd, as /* Opaque data for load_section_callback. */ struct load_section_data { - unsigned long load_offset; + CORE_ADDR load_offset; struct load_progress_data *progress_data; VEC(memory_write_request_s) *requests; }; @@ -2126,9 +2126,9 @@ generic_load (char *args, int from_tty) if (argv[1] != NULL) { - char *endptr; + const char *endptr; - cbdata.load_offset = strtoul (argv[1], &endptr, 0); + cbdata.load_offset = (CORE_ADDR) strtoulst (argv[1], &endptr, 0); /* If the last word was not a valid number then treat it as a file name with spaces in. */