Thursday, April 26, 2018

Gdb debugging on Target and Local systems on Linux environment

GDB Debugging

Compile binary with -g option:  gcc file.c -g -o file_out

Development PC works as a client machine:
  $ gdb ./file_out

  (gdb)b main
  (gdb)b filename:10
  (gdb)c //used to run the programe
  (gdb) list
  (gdb) print var


Target GDB Debugging
Target or R&D System :
 $ ifconfig
   11.19.81.198

 $ ./gdbserver.i686 host:2345 ./file_out
   Listening on port 2345
   Remote debugging from host  11.19.89.132


Development PC works as a client machine:
  $ gdb ./file_out

  then connect remote lcoation 
  (gdb) target remote 11.19.81.198:2345
       Reading /lib/ld-linux.so.2 from remote target...
       warning: File transfers from remote targets can be slow. Use "set sysroot" to access files locally instead.
       Reading /lib/ld-linux.so.2 from remote target...
       Reading symbols from target:/lib/ld-linux.so.2...Reading /lib/ld-2.24.so from remote target...
       Reading /lib/.debug/ld-2.24.so from remote target...
       (no debugging symbols found)...done.
       0x4b6f3a20 in ?? () from target:/lib/ld-linux.so.2
  (gdb) set remote exec-file /bin/true
  (gdb)b main
  (gdb)b filename.c:10
  (gdb)c //used to run the programe
     Continuing.
     Reading /lib/libc.so.6 from remote target...
     Reading /lib/libc-2.24.so from remote target...
     Reading /lib/.debug/libc-2.24.so from remote target...
  (gdb) list
  (gdb) print var

Wrappers:
$ gdbserver --wrapper env LD_PRELOAD=libtest.so -- :2222 ./testprog
The --selftest option runs the self tests in gdbserver:
$ gdbserver --selftestmonitor set debug 0

Enable / Disable logs:
(gdb) monitor set debug 1
(gdb) monitor set debug 1
(gdb) monitor set remote-debug 0
(gdb) monitor set remote-debug 1




Thursday, March 22, 2018

Creating a articles for files formats .C, .CPP , .H, .HPP, .HXX, .ii, .ixx, .inl,

First extensions used for C++ were .c and .h, exactly like for C. This caused practical problems, especially the .c which didn't allow build systems to easily differentiate C++ and C files.
Unix, on which C++ has been developed, has case-sensitive file systems. So some used .C for C++ files. Other used .c++.cc and .cxx.C and .c++ have the problem that they aren't available on other file systems and their use quickly dropped. DOS and Windows C++ compilers tended to use .cpp, and some of them make the choice difficult, if not impossible, to configure. Portability consideration made that choice the most common, even outside MS-Windows.
Headers have used the corresponding,.H.h++.hh.hxx and .hpp. But unlike the main files, .h remains to this day a popular choice for C++ even with the disadvantage that it doesn't allow to know if the header can be included in C context or not. Standard headers now have no extension at all.
Additionally, some are using .ii.ixx.ipp.inl for headers providing inline definitions and .txx.tpp and .tpl for template definitions. Those are either included in the headers providing the definition, or manually in the contexts where they are needed.
Compilers and tools usually don't care about what extensions are used, but using an extension that they associate with C++ prevents the need to track out how to configure them so they correctly recognize the language used.
Visual Studio recognize .ixx as a default extension for module interfaces, clang++ is recognizing.c++m.cppm and .cxxm for the same purpose.

Wednesday, March 14, 2018

Moore’s Law : Transistors life

Moore’s Law
               Moore's law refers to the observation that the number of transistors in a dense integrated circuit doubles approximately every two years. Moore's law is an observation or projection and not a physical or natural law. The observation is named after Gordon Moore, the co-founder of Fairchild Semiconductor and Intel, whose 1965 paper described a doubling every year in the number of components per integrated circuit, and projected this rate of growth would continue for at least another decade. In 1975 looking forward to the next decade, he revised the forecast to doubling every two years.The period is often quoted as 18 months because of Intel executive David House, who predicted that chip performance would double every 18 months.


Note:  Number of transistors in a dense integrated circuit doubles approximately every two years

Tuesday, March 13, 2018

Reading a flash device(SST25VF016B) memory Example code in C++

Reading flash device(My Case chip BIOS) with flashrom open source software and ready binary memory at particular offset(3975) from there 15 characters from 3975-3990.

Saturday, March 10, 2018

3 Best Free VPN Services for 2018 FREE download links


Top 3  free 100% free.1st  is the best 

Click on download link to download the FREE VPN's

1.Psiphon DOWNLOAD 

2. Ultrasurf DOWNLOAD 

3. Betterment  DOWNLOAD



Thursday, March 8, 2018

ASCII and HEX and Actual symbol in programming

ASCII
 Hex
Symbol

0
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
0
1
2
3
4
5
6
7
8
9
A
B
C
D
E
F
NUL
SOH
STX
ETX
EOT
ENQ
ACK
BEL
BS
TAB
LF
VT
FF
CR
SO
SI
ASCII
Hex
Symbol

16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
10
11
12
13
14
15
16
17
18
19
1A
1B
1C
1D
1E
1F
DLE
DC1
DC2
DC3
DC4
NAK
SYN
ETB
CAN
EM
SUB
ESC
FS
GS
RS
US
ASCII
Hex
Symbol

32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
20
21
22
23
24
25
26
27
28
29
2A
2B
2C
2D
2E
2F
(Space)
!
"
#
$
%
&
'
(
)
*
+
,
-
.
/
ASCII
Hex
Symbol

48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
30
31
32
33
34
35
36
37
38
39
3A
3B
3C
3D
3E
3F
0
1
2
3
4
5
6
7
8
9
:
;
<
=
>
?
ASCII
Hex
Symbol

64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
40
41
42
43
44
45
46
47
48
49
4A
4B
4C
4D
4E
4F
@
A
B
C
D
E
F
G
H
I
J
K
L
M
N
O
ASCII
Hex
Symbol

80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
50
51
52
53
54
55
56
57
58
59
5A
5B
5C
5D
5E
5F
P
Q
R
S
T
U
V
W
X
Y
Z
[
\
]
^
_
ASCII
Hex
Symbol

96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
60
61
62
63
64
65
66
67
68
69
6A
6B
6C
6D
6E
6F
`
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
ASCII
Hex
Symbol

112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
70
71
72
73
74
75
76
77
78
79
7A
7B
7C
7D
7E
7F
p
q
r
s
t
u
v
w
x
y
z
{
|
}
~






ASCII

Hex

Symbol

Type

Description

0
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
0
1
2
3
4
5
6
7
8
9
A
B
C
D
E
F
NUL
SOH
STX
ETX
EOT
ENQ
ACK
BEL
BS
TAB
LF
VT
FF
CR
SO
SI

CC
CC
CC
CC
CC
CC

FE
FE
FE
FE
FE
FE


Null
Start of Heading
Start of Text
End of Text
End of Transmission
Enquiry
Acknowledge
Bell (audible or attention signal)
Backspace
Horizontal Tabulation
Line Feed
Vertical Tabulation
Form Feed
Carriage Return
Shift Out
Shift In
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
10
11
12
13
14
15
16
17
18
19
1A
1B
1C
1D
1E
1F
DLE
DC1
DC2
DC3
DC4
NAK
SYN
ETB
CAN
EM
SUB
ESC
FS
GS
RS
US
CC




CC
CC
CC




IS
IS
IS
IS
Data Link Escape
Device Control 1
Device Control 2
Device Control 3
Device Control 4
Negative Acknowledge
Synchronous Idle
End of Transmission Block
Cancel
End of Medium
Substitute
Escape
File Separator
Group Separator
Record Separator
Unit Separator


           Type     Description
CC
FE
IS
Communication Control
Format Effector
Information Separator

Was able to successfully add blacklisted "flashrom" recipe in windriver linux

I was able to successfully add the "flashrom" recipe.

Please find the steps I've done:
==================================================
> mkdir -p my-project

> cd my-project

> git clone --branch WRLINUX_9_LTS_CVE \
https://windshare.windriver.com/remote.php/gitsmart/WRLinux-9-LTS-CVE/wrlinux-9

> ./wrlinux-9/setup.sh --machines qemux86-64

> echo "Obtainin the required information for STEP 2 at[Enabling Unsupported Packages with PNWHITELIST]"

> cat ./layers/meta-openembedded/meta-oe/conf/layer.conf | grep BBFILE_COLLECTIONS | awk '{print $3}'
>> BBFILE_COLLECTIONS += "openembedded-layer"

> source oe-init-build-env

> echo "PNBLACKLIST[flashrom] = \"\"" >> ./conf/local.conf

> echo "PNWHITELIST_openembedded-layer_append = \" flashrom\"" >> ./conf/local.conf 

> bitbake wrlinux-image-glibc-small
Please, consider this steps as a guide, not as a script.
==================================================

The explanation is:
1. Create the project
2. Find the collection name in the layer configuration file
3. Initialize your project "source oe-init-build-env"
4. Edit your local.conf file with the desired information to unset the blacklist and add the desired package to the whitelist.

Thursday, March 1, 2018

Valgrind for memory leaks on run-time ENV

Valgrind for memory leaks
Valgrind is an instrumentation framework for building dynamic analysis tools. There are Valgrind tools that can automatically detect many memory management and threading bugs, and profile your programs in detail. You can also use Valgrind to build new tools.


Monday, February 26, 2018

Friday, February 23, 2018

Create Shared Library Function Calls in Linux or Unix 3 steps

Creating Shared Library Function Calls in Linux

1. Create programe code ngprogram.c

#include <stdio.h>
#include <unistd.h>
int main() 
{
        puts("aroundng dot com world!n");
    return 0;
}

2. libaroundng.c file library code

#include <stdio.h> 
#include <unistd.h> 
#include <dlfcn.h> 
int puts(const char *message) 
int (*new_puts)(const char *message);
int result; 
new_puts = dlsym(RTLD_NEXT, "puts"); 
if(strcmp(message, "aroundng dot com world!n") == 0)
   { 
       result = new_puts("Goodbye, aroundng!\n");
    } 
   else 
    { 
         result = new_puts(message);
     } 
   return result; 
}

3. Create and then export library :
$ gcc libaroundng.c -o libaroundng.so -fPIC -shared -ldl -D_GNU_SOURCE
$ export LD_PRELOAD="${PWD}/libexample.so"

Finally, Compile:
$ gcc ngprogram.c -o ngprogram
$ ./ngprogram
Goodbye, aroundng!
$

Here system call is   puts(const char *message)

Feel free ask any queries  

"NCBN Nara chandrababu naidu" CEO Deals to grow Andhra Pradesh

CISCO network and andhra pradesh CEO Chandra babu  Microsoft Kaizala for andhra pradesh  Google Wi-fi for andhra pradesh CEO Micro...