Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 07 Nov 2019 06:53:27 +0000
From:      bugzilla-noreply@freebsd.org
To:        bugs@FreeBSD.org
Subject:   [Bug 241773] lldb does not display external variables properly.
Message-ID:  <bug-241773-227-4B3jcrZIlZ@https.bugs.freebsd.org/bugzilla/>
In-Reply-To: <bug-241773-227@https.bugs.freebsd.org/bugzilla/>

index | next in thread | previous in thread | raw e-mail

https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=241773

--- Comment #2 from bc979@lafn.org ---
I modified testlib to be:

master# vi testlib.c

#include <sys/stat.h>
#include <stdio.h>
#include <string.h>
#include <strings.h>

char id[4];
int sock;

void testfunc() {
  struct stat sb;
  stat("testlib.c", &sb);
  strcpy (id, "aa");
  sock = 5;
  printf ("sock = %d, id = %s\n", sock, id);
  printf("Size of testlib.c is %i bytes.\n", (int)sb.st_size);
}


The results are exatly the same other than there is the extra line of output.

(lldb) p id
(char [4]) $0 = ""
(lldb) p sock
(int) $1 = 0
(lldb) p &id
(char (*)[4]) $2 = 0x000000080024d000

-- 
You are receiving this mail because:
You are the assignee for the bug.

home | help

Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-241773-227-4B3jcrZIlZ>