From 4932389582c529bfc28a553381a422ba6e0ec728 Mon Sep 17 00:00:00 2001 From: Gary Benson Date: Thu, 19 Jan 2012 12:51:04 +0000 Subject: [PATCH] 2012-01-19 Gary Benson * mdebugread.c (sort_blocks): Replace integer constants with ones derived from FIRST_LOCAL_BLOCK. --- gdb/ChangeLog | 5 +++++ gdb/mdebugread.c | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 120bcbc1347..dfce58b66d2 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,8 @@ +2012-01-19 Gary Benson + + * mdebugread.c (sort_blocks): Replace integer constants with ones + derived from FIRST_LOCAL_BLOCK. + 2012-01-18 Paul Pluzhnikov Jan Kratochvil diff --git a/gdb/mdebugread.c b/gdb/mdebugread.c index c95c09b62ed..e6d3b8c739f 100644 --- a/gdb/mdebugread.c +++ b/gdb/mdebugread.c @@ -4713,7 +4713,7 @@ sort_blocks (struct symtab *s) { struct blockvector *bv = BLOCKVECTOR (s); - if (BLOCKVECTOR_NBLOCKS (bv) <= 2) + if (BLOCKVECTOR_NBLOCKS (bv) <= FIRST_LOCAL_BLOCK) { /* Cosmetic */ if (BLOCK_END (BLOCKVECTOR_BLOCK (bv, GLOBAL_BLOCK)) == 0) @@ -4728,7 +4728,7 @@ sort_blocks (struct symtab *s) * are very different. It would be nice to find a reliable test * to detect -O3 images in advance. */ - if (BLOCKVECTOR_NBLOCKS (bv) > 3) + if (BLOCKVECTOR_NBLOCKS (bv) > FIRST_LOCAL_BLOCK + 1) qsort (&BLOCKVECTOR_BLOCK (bv, FIRST_LOCAL_BLOCK), BLOCKVECTOR_NBLOCKS (bv) - FIRST_LOCAL_BLOCK, sizeof (struct block *), -- 2.30.2