This is the mail archive of the gdb-prs@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/22924] New: Hardware-watchpoint in C-program locks gdb


https://sourceware.org/bugzilla/show_bug.cgi?id=22924

            Bug ID: 22924
           Summary: Hardware-watchpoint in C-program locks gdb
           Product: gdb
           Version: 7.7
            Status: UNCONFIRMED
          Severity: minor
          Priority: P2
         Component: c++
          Assignee: unassigned at sourceware dot org
          Reporter: franz.reiter at cadcam dot co.at
  Target Milestone: ---

The following C-program locks gdb:

# compile:
cc t1.c -ggdb -pg

# start gdb, define watchpoint ..
gdb a.out
watch iarr[3]
run
continue

# debugger hangs with message:
Fehlerdiagnose-Register kann nicht geschrieben werden: Das Argument ist
ungültig.

Using:
Ubuntu 14.04.03
gcc 4.8.4
gdb 7.7.1


-------------------------------------
#include <math.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>

#define SIZ 100
static int *iarr=NULL;

//============================================================
  int main (int argc, char *argv[]) {
//============================================================

  int   i1;

  printf("Testprog GDB_PROBLEM\n");

  if(iarr == NULL) 
    iarr = (int*) realloc ((void*)iarr, SIZ * sizeof(int));

  for(i1 = 0; i1 < SIZ; ++i1) iarr[i1] = i1;

  return 0;

}


// EOF

-- 
You are receiving this mail because:
You are on the CC list for the bug.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]